[issue31092] delicate behaviour of shared (managed) multiprocessing Queues

Antoine Pitrou report at bugs.python.org
Sun Oct 8 15:55:26 EDT 2017


Antoine Pitrou <pitrou at free.fr> added the comment:

@Prof Plum

> When I call pool.apply_async() I expect it only to return when the worker process has been started and finished it's initialization process

Well... it's called *async* for a reason, so I'm not sure why the behaviour would be partially synchronous.

@Oren

> Should we fix this?

I'm not sure how.  In mp.Pool we don't want to keep references to input objects longer than necessary.

> Or is it the responsibility of the user to not destroy shared objects too soon?  (In that case, maybe we should mention it in the docs?)

Yes to both questions, IMO.

(note: changing title to better reflect issue)

----------
title: multiprocessing.Manager() race condition -> delicate behaviour of shared (managed) multiprocessing Queues

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31092>
_______________________________________


More information about the Python-bugs-list mailing list