Author sultanqasim
Recipients sultanqasim
Date 2013-04-13.01:30:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za>
In-reply-to
Content
This issue seems to be new in Python 3.3.1. This worked fine in Python 3.3.0 and earlier. I am using fully up-to-date installation of Arch Linux, running the official arch repo's 64 bit build of Python 3.3.1.
This issue is probably a result of the changes to multiprocessing's pipes brought about in solutions to issues #10527 or #16955.

The multiprocessing Queue's get() method on Python 3.3.1 does not block on Linux when a timeout of 1 second or less is specified. I have not tested this on Windows or Mac OS X.

Example Code:
from multiprocessing import Queue
q = Queue()

q.get(True, 0.5)
# Expected result: block for half a second before throwing exception
# Actual result: throws empty exception immediately without waiting

q.get(True, 1)
# Expected result: block for one second before throwing exception
# Actual result: throws empty exception immediately without waiting

q.get(True, 1.00001)
# Expected result: block for just over a second before throwing exception
# Actual result: throws empty exception immediately without waiting

q.get(True, 1.00002)
# Blocks for just over a second, as expected

q.get(True, 2)
# Blocks for two seconds, as expected
History
Date User Action Args
2013-04-13 01:30:25sultanqasimsetrecipients: + sultanqasim
2013-04-13 01:30:25sultanqasimsetmessageid: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za>
2013-04-13 01:30:25sultanqasimlinkissue17707 messages
2013-04-13 01:30:25sultanqasimcreate