Message173033
| Author |
ethan.furman |
| Recipients |
amaury.forgeotdarc, ethan.furman, jnoller |
| Date |
2012年10月16日.12:16:57 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1350389817.55.0.995425148307.issue16246@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
On Windows multiprocessing has a well known limitation: because there is no fork() new shells must be invoked, and if the call that ultimately starts multiprocessing is not guarded by an `if __name__ == '__main___'` check an infinite loops results and you have a very nice brick instead of a computer.
On Stackoverflow I proposed a work-around [1], which is basically to check if an environment variable exists (MP_GUARD is this case), and if it does raise an exception.
I'm going to try and merge that into multiprocessing itself. Are there any other platforms besides Windows where this is a problem?
[1] http://stackoverflow.com/q/12852643/208880 |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年10月16日 12:16:57 | ethan.furman | set | recipients:
+ ethan.furman, amaury.forgeotdarc, jnoller |
| 2012年10月16日 12:16:57 | ethan.furman | set | messageid: <1350389817.55.0.995425148307.issue16246@psf.upfronthosting.co.za> |
| 2012年10月16日 12:16:57 | ethan.furman | link | issue16246 messages |
| 2012年10月16日 12:16:57 | ethan.furman | create |
|