de46464aa3595c0fcb622ceaf2248eb9266e46e8,python/ray/experimental/queue.py,Queue,get,#Queue#Any#Any#,77

Before Change


        elif timeout is None:
            // Polling
            // Use a not_empty condition variable or return a promise?
            success, item = ray.get(self.actor.get.remote())
            while not success:
                // Consider adding time.sleep here
                success, item = ray.get(self.actor.get.remote())

After Change


            ValueError if timeout is negative.
        
        if not block:
            try:
                return ray.get(self.actor.get_nowait.remote())
            except asyncio.QueueEmpty:
                raise Empty
        else:
            if timeout is not None and timeout < 0:
                raise ValueError(""timeout" must be a non-negative number")
            else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ray-project/ray
Commit Name: de46464aa3595c0fcb622ceaf2248eb9266e46e8
Time: 2020-08-19
Author: architkulkarni@users.noreply.github.com
File Name: python/ray/experimental/queue.py
Class Name: Queue
Method Name: get


Project Name: ray-project/ray
Commit Name: de46464aa3595c0fcb622ceaf2248eb9266e46e8
Time: 2020-08-19
Author: architkulkarni@users.noreply.github.com
File Name: python/ray/experimental/queue.py
Class Name: Queue
Method Name: put


Project Name: mindsdb/mindsdb
Commit Name: af5aeb26d96291562884f17cbfbbd917636bc7b7
Time: 2021-03-15
Author: george@cerebralab.com
File Name: mindsdb/interfaces/model/model_interface.py
Class Name: ModelInterface
Method Name: __init__