Commit d19116f3 authored by Denis Bilenko's avatar Denis Bilenko

greenlet: use Waiter.get instead of depreacted Waiter.wait

parent 11b25c62
...@@ -304,7 +304,7 @@ class Greenlet(greenlet): ...@@ -304,7 +304,7 @@ class Greenlet(greenlet):
waiter = Waiter() waiter = Waiter()
core.active_event(_kill, self, exception, waiter) core.active_event(_kill, self, exception, waiter)
if block: if block:
waiter.wait() waiter.get()
self.join(timeout) self.join(timeout)
# it should be OK to use kill() in finally or kill a greenlet from more than one place; # it should be OK to use kill() in finally or kill a greenlet from more than one place;
# thus it should not raise when the greenlet is already killed (= not started) # thus it should not raise when the greenlet is already killed (= not started)
...@@ -550,7 +550,7 @@ def killall(greenlets, exception=GreenletExit, block=True, timeout=None): ...@@ -550,7 +550,7 @@ def killall(greenlets, exception=GreenletExit, block=True, timeout=None):
if block: if block:
t = Timeout.start_new(timeout) t = Timeout.start_new(timeout)
try: try:
alive = waiter.wait() alive = waiter.get()
if alive: if alive:
joinall(alive, raise_error=False) joinall(alive, raise_error=False)
finally: finally:
......
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