Commit 47ed386f authored by Denis Bilenko's avatar Denis Bilenko

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

--HG--
extra : transplant_source : %7C%F1%A7%81%D6%DC%5C%40e7%D1%DA%22%95-%92t%09%12.
parent 97f3af47
......@@ -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