Issue 13937: multiprocessing.ThreadPool.join() blocks indefinitely. (original) (raw)

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.