[issue15702] Multiprocessing Pool deadlocks on join after empty map operation

James Hutchison report at bugs.python.org
Thu Aug 16 22:41:48 CEST 2012


New submission from James Hutchison:

Following code deadlocks on Windows 7 64-bit, Python 3.2.3

If you have a pool issue a map operation over an empty iterable then try to join later, it will deadlock. If there is no map operation or blah in the code below isn't empty, it does not deadlock

from multiprocessing import Pool

def main():
    p = Pool();
    blah = [];
    print("Mapping");
    p.map(dummy, blah);
    p.close();
    p.join(); # deadlocks here
    print("Done");

def dummy(x):
    pass;

if __name__ == "__main__":
    main();

----------
components: Library (Lib)
messages: 168408
nosy: Jimbofbx
priority: normal
severity: normal
status: open
title: Multiprocessing Pool deadlocks on join after empty map operation
type: behavior
versions: Python 3.2

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


More information about the Python-bugs-list mailing list