[New-bugs-announce] [issue13937] multiprocessing.ThreadPool.join() blocks indefinitely.

Ben Timby report at bugs.python.org
Fri Feb 3 22:29:23 CET 2012

New submission from Ben Timby <btimby at gmail.com>:

If you instantiate a ThreadPool, then call map() with an empty list, the join() method will block indefinitely on self._result_handler.join()

$ python
> from multiprocessing.pool import ThreadPool
> t = ThreadPool(1)
> t.map_async(lambda x: x, [])
> t.close()
> t.join()  # <- never returns

I was not able to determine the root cause, however, I found that the join() blocks when joining the _result_handler thread.

components: Library (Lib)
messages: 152566
nosy: Ben.Timby
priority: normal
severity: normal
status: open
title: multiprocessing.ThreadPool.join() blocks indefinitely.
type: behavior
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list