Commit 4637190a authored by Denis Bilenko's avatar Denis Bilenko

queue.Queue: fix embarassing typo in put() method and add a comment about a bug it still has

parent 29e55da1
...@@ -44,7 +44,9 @@ class Queue(object): ...@@ -44,7 +44,9 @@ class Queue(object):
if timeout < 0: if timeout < 0:
raise ValueError("'timeout' must be a positive number") raise ValueError("'timeout' must be a positive number")
with timeout(timeout, Full): with timeout(timeout, Full):
return self.q.wait() # XXX even if timeout fires, item ends up in a queue anyway, because
# Channel.send is not transactional
return self.q.send(item)
else: else:
if self.q.full(): if self.q.full():
raise Full raise Full
......
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