[New-bugs-announce] [issue16246] Multiprocessing infinite loop on Windows

Ethan Furman report at bugs.python.org
Tue Oct 16 14:16:57 CEST 2012


New submission from Ethan Furman:

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

----------
components: Windows
messages: 173033
nosy: amaury.forgeotdarc, jnoller, stoneleaf
priority: normal
severity: normal
status: open
title: Multiprocessing infinite loop on Windows
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16246>
_______________________________________


More information about the New-bugs-announce mailing list