This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ndfred
Recipients ndfred
Date 2009-01-19.12:57:22
SpamBayes Score 0.00375167
Marked as misclassified No
Message-id <>
Objects contained in a multiprocessing.Queue object are not comming out
of the queue in the same order as they went in. For instance, if I put
in object1, object2 and object3 in this very time sequence from multiple
processes, they can end up comming out of the queue as object2, object1
then object3 instead of the original order.

When using the threading module instead of multiprocessing everything is

The provided test script adds strings to the queue with timestamps.
These messages are not ordered by timestamp when they are printed. This
is an output of the test script with format "[pid@time] message":

[2120@00406] Got lock
[2120@02424] Released lock
[2121@02426] Got lock
[2121@04439] Released lock
[2121@16459] Released lock
[2120@16461] Got lock
[2121@18464] Got lock
[2120@18462] Released lock
[2121@20466] Released lock

Using print to print the message immediatly prints the messages in the
right order.

See this mailing-list thread for details:
Date User Action Args
2009-01-19 12:57:25ndfredsetrecipients: + ndfred
2009-01-19 12:57:25ndfredsetmessageid: <>
2009-01-19 12:57:24ndfredlinkissue4999 messages
2009-01-19 12:57:23ndfredcreate