[New-bugs-announce] [issue43306] Error in multiprocessing.Pool's initializer doesn't stop execution

Dávid Nemeskey 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)
messages: 387577
nosy: docs at python, nemeskeyd
priority: normal
severity: normal
status: open
title: Error in multiprocessing.Pool's initializer doesn't stop execution
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43306>
_______________________________________


More information about the New-bugs-announce mailing list