Commit 129ae841 authored by Denis Bilenko's avatar Denis Bilenko

don't ignore timeout parameter in joinall()

parent 1586dcdc
...@@ -405,6 +405,8 @@ def joinall(greenlets, timeout=None, raise_error=False): ...@@ -405,6 +405,8 @@ def joinall(greenlets, timeout=None, raise_error=False):
from gevent.queue import Queue from gevent.queue import Queue
queue = Queue() queue = Queue()
put = queue.put put = queue.put
timeout = Timeout(timeout)
try:
try: try:
for greenlet in greenlets: for greenlet in greenlets:
greenlet.rawlink(put) greenlet.rawlink(put)
...@@ -416,6 +418,8 @@ def joinall(greenlets, timeout=None, raise_error=False): ...@@ -416,6 +418,8 @@ def joinall(greenlets, timeout=None, raise_error=False):
for greenlet in greenlets: for greenlet in greenlets:
greenlet.unlink(put) greenlet.unlink(put)
raise raise
finally:
timeout.cancel()
def _killall3(greenlets, exception, waiter): def _killall3(greenlets, exception, waiter):
......
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