[issue28982] multiprocessing.Queue.get(block=True, timeout=0) always raises queue.Empty

2016-12-17 Thread Ryan Brindley
Ryan Brindley added the comment: I've updated the PR to also include raising a ValueError for timeout values < 0. This behavior mimics that of queue.Queue (noting here again that queue.Queue handles timeout = 0). -- ___ Python tracker &

[issue28982] multiprocessing.Queue.get(block=True, timeout=0) always raises queue.Empty

2016-12-16 Thread Ryan Brindley
Ryan Brindley added the comment: In addition, queue.Queue supports timeout value of 0 and its documentation says "non-negative number". -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.py

[issue28982] multiprocessing.Queue.get(block=True, timeout=0) always raises queue.Empty

2016-12-16 Thread Ryan Brindley
Ryan Brindley added the comment: So, the code handles timeout = 0 on systems where time.time() returns an int. Look at the following snippet and consider 2 assumptions: (1) time.time() returns an int, and (2) self._rlock.acquire call takes less than a second if block

[issue28982] multiprocessing.Queue.get(block=True, timeout=0) always raises queue.Empty

2016-12-15 Thread Ryan Brindley
New submission from Ryan Brindley: Hey dev team, According to the following test, `q.get(True, 0)` always raises queue.Empty. from multiprocessing import Queue q = Queue() q.put('foo') q.get(True, 0) # raises Empty This result throws me off as I was expecting a similar result