This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: multiprocessing pool blocks SIGTERM from being handled
Type: behavior Stage: resolved
Components: Documentation Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: docs@python Nosy List: djones, docs@python, serhiy.storchaka
Priority: normal Keywords:

Created on 2015-10-29 15:28 by djones, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg253678 - (view) Author: David Jones (djones) Date: 2015-10-29 15:28
This is probably related to #21913, but more specifically concerns the documentation. I have a sub process of a larger program that handles a SIGTERM sent by the main process for a clean shutdown. However, if I launch a parallel task in the sub process, via multiprocessing.Pool.imap_unordered, all signals are blocked until pool finishes running the task. 

If this isn't going to be fixed, then it ought to at least be clearly documented. It took a very long time to diagnose this problem. It requires a programmer to understand the underlying implementation of a high-level construct, thus defeating the purpose of using a high level construct.

Also, is there a way to work around this?
msg370441 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-05-31 13:20
Python 2.7 is no longer supported.
History
Date User Action Args
2022-04-11 14:58:23adminsetgithub: 69697
2020-05-31 13:20:34serhiy.storchakasetstatus: open -> closed

nosy: + serhiy.storchaka
messages: + msg370441

resolution: out of date
stage: resolved
2015-10-29 15:28:51djonescreate