[New-bugs-announce] [issue41606] multiprocessing.Event.wait hangs when interrupted by signal that sets the event
report at bugs.python.org
Fri Aug 21 04:01:43 EDT 2020
New submission from Salvatore Ingala <salvatore.ingala at gmail.com>:
According to the docs, multiprocessing.Event is a clone of threading.Event. Yet, there is a strange behavior that is observed only on multiprocessing.Event. If an event.wait() is interrupted by a SIGINT and the signal handler sets the event, then the call to event.set() hangs if event is an instance of multiprocessing.Event, in what looks like a deadlock; instead, it works as expected if it's an instance of threading.Event.
See the file attached for a reproduction.
It seems to have been so for a long time, see: https://stackoverflow.com/questions/24422154/multiprocessing-event-wait-hangs-when-interrupted-by-a-signal/30831867
title: multiprocessing.Event.wait hangs when interrupted by signal that sets the event
versions: Python 3.8
Added file: https://bugs.python.org/file49419/event-test.py
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce