You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2016-05-03.06:26:21.158>created_at=<Date2016-05-02.09:48:14.631>labels= ['type-bug', 'invalid']
title='from multiprocessing.pool import Pool bug on linux'updated_at=<Date2016-05-03.06:26:21.157>user='https://bugs.python.org/859911096'
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.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: