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 Prof Plum
Recipients Oren Milman, Prof Plum, davin, pitrou, tlxxzj
Date 2017-10-08.21:22:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1507497757.38.0.213398074469.issue31092@psf.upfronthosting.co.za>
In-reply-to
Content
@Antoine Pitrou

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

To a avoid race condition

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

Like I said you could just add some sort of "safe" flag to the apply_async() call safe=True would mean the initialization of the worker is done synchronously safe=False would be the normal behavior. Even if you decide it's the user's responsibility to not delete the queue if the user's code is exiting a function that would basically amount to them calling sleep() for some guessed amount of time. With a safe flag they wouldn't have to guess the time or call sleep which is kinda ugly IMO. Also if someone see's that apply_async() has a safe flag they are more likely to look up what it does than they are to read the full docs to apply_async().
History
Date User Action Args
2017-10-08 21:22:37Prof Plumsetrecipients: + Prof Plum, pitrou, davin, Oren Milman, tlxxzj
2017-10-08 21:22:37Prof Plumsetmessageid: <1507497757.38.0.213398074469.issue31092@psf.upfronthosting.co.za>
2017-10-08 21:22:37Prof Plumlinkissue31092 messages
2017-10-08 21:22:37Prof Plumcreate