Josh Rosenberg added the comment:

The Queue module (queue on Py3) is for communication between threads, not 
processes; what you've written wouldn't behave correctly on any version of 
Python. You want to use multiprocessing's Queue class, not Queue.Queue, and to 
avoid possible deadlocks, you want to populate it after the pool workers are 
running.

In any event, id(q) is expected to match on Linux, which has fork semantics (so 
the memory space in parent and child is initially identical). On Windows it 
differs because spawn based multiprocessing means the objects are recreated in 
the child processes, rather than inherited directly.

This is a problem with your code and understanding on forking, not a problem in 
Python.

----------
nosy: +josh.r

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26905>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to