Message303921
@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(). |
|
Date |
User |
Action |
Args |
2017-10-08 21:22:37 | Prof Plum | set | recipients:
+ Prof Plum, pitrou, davin, Oren Milman, tlxxzj |
2017-10-08 21:22:37 | Prof Plum | set | messageid: <1507497757.38.0.213398074469.issue31092@psf.upfronthosting.co.za> |
2017-10-08 21:22:37 | Prof Plum | link | issue31092 messages |
2017-10-08 21:22:37 | Prof Plum | create | |
|