Commit 11b25c62 authored by Denis Bilenko's avatar Denis Bilenko

queue: use Waiter.get instead of deprecated Waiter.wait

parent 2ea5a374
......@@ -126,7 +126,7 @@ class Queue(object):
try:
if self.getters:
self._schedule_unlock()
result = waiter.wait()
result = waiter.get()
assert result is waiter, "Invalid switch into Queue.put: %r" % (result, )
if waiter.item is not _NONE:
self._put(item)
......@@ -175,7 +175,7 @@ class Queue(object):
self.getters.add(waiter)
if self.putters:
self._schedule_unlock()
return waiter.wait()
return waiter.get()
finally:
self.getters.discard(waiter)
timeout.cancel()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment