[issue6147] multithreading.Pool.map() crashes Windows computer

Merlijn van Deen report at bugs.python.org
Sat Mar 10 19:26:46 CET 2012


Merlijn van Deen <valhallasw at gmail.com> added the comment:

Two questions:
(1) can this be at least be added as a big fat warning in the documentation?
(2) would it be a reasonable option to let either
  (a) the creation of a Pool
  (b) executing something using the Pool
cause an exception when it happens during the import of the function to run?

I think it makes sense to prevent any accidental forkbombs, especially if they are /this/ easy to create. Untested (for obvious reasons...), but this should be enough:

import multiprocessing
def x(val):
   return val
multiprocessing.Pool().map(x, range(10))

----------
nosy: +valhallasw

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


More information about the Python-bugs-list mailing list