de46464aa3595c0fcb622ceaf2248eb9266e46e8,python/ray/experimental/queue.py,Queue,put,#Queue#Any#Any#Any#,45

Before Change


            // Polling
            // Use a condition variable or switch to promise?
            success = False
            while not success and time.time() < endtime:
                success = ray.get(self.actor.put.remote(item))
            if not success:
                raise Full

    def get(self, block=True, timeout=None):

After Change


            ValueError if timeout is negative.
        
        if not block:
            try:
                ray.get(self.actor.put_nowait.remote(item))
            except asyncio.QueueFull:
                raise Full
        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: 5

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: put


Project Name: ray-project/ray
Commit Name: 4cef1ee591648f289a4e6f00d70e03625e252594
Time: 2020-06-01
Author: xmo@berkeley.edu
File Name: python/ray/serve/router.py
Class Name: Router
Method Name: remove_worker


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