[New-bugs-announce] [issue43306] Error in multiprocessing.Pool's initializer doesn't stop execution
report at bugs.python.org
Tue Feb 23 10:55:10 EST 2021
New submission from Dávid Nemeskey <nemeskeyd at gmail.com>:
There is an inconsistency in how multiprocessing.Pool handles exceptions thrown in the workers:
- exceptions raised by the mapped function stop execution right away
- exceptions raised in an initializer are ignored and the pool continues spawning new workers indefinitely, each of them failing.
I believe the behavior should be the same in both cases, and of the two, the first one is preferable (especially since that's what people are used to).
The documentation doesn't cover how exceptions are handled in pools, either.
assignee: docs at python
components: Documentation, Library (Lib)
nosy: docs at python, nemeskeyd
title: Error in multiprocessing.Pool's initializer doesn't stop execution
versions: Python 3.8
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce