Commit e4bef9df authored by Jason Madden's avatar Jason Madden

Merge branch 'patch-1' of https://github.com/DuLLSoN/gevent into pr554

parents 5f540971 56cd992d
......@@ -349,7 +349,12 @@ class JoinableQueue(Queue):
def __init__(self, maxsize=None, items=None, unfinished_tasks=None):
from gevent.event import Event
Queue.__init__(self, maxsize, items)
self.unfinished_tasks = unfinished_tasks or 0
if unfinished_tasks:
self.unfinished_tasks = unfinished_tasks
elif items:
self.unfinished_tasks = len(items)
else:
self.unfinished_tasks = 0
self._cond = Event()
self._cond.set()
......
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