[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows

Matt Chaput report at bugs.python.org
Tue Mar 4 23:04:34 CET 2014


Matt Chaput added the comment:

IIRC the root issue turned out to be that when you execute any multiprocessing statements at the module/script level on Windows, you need to put it under if __name__ == "__main__", otherwise it will cause infinite spawning.

I think this is mentioned in the multiprocessing docs but should probably be in giant blinking red letters ;)

----------

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


More information about the Python-bugs-list mailing list