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: Race condition in wait with timeout for multiprocessing.Event
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: iritkatriel, tomMoral
Priority: normal Keywords:

Created on 2017-11-09 13:48 by tomMoral, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
concurrent_event.py tomMoral, 2017-11-09 13:48 Script to reproduce the bug.
Messages (2)
msg305960 - (view) Author: Thomas Moreau (tomMoral) * Date: 2017-11-09 13:48
If the methods `set` and `clear` of `multiprocessing.Event` are called one after another, while a `multiprocessing.Process` calls `wait`, the  `Event` does not match the documented behavior (https://docs.python.org/3.7/library/threading.html#threading.Event.wait) and the call to wait can return `False` even though the call to wait did not timeout (This happens both with `timeout=30` or `timeout=None`).

Attached is a script reproducing this issue.
The documentation should either be changed or the behavior should be updated.
msg411501 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-24 18:21
Python 3.6 is no longer maintained and I failed to reproduce this on a Mac on 3.11. 

Please create a new issue if you are seeing the problem on a current python version (>= 3.9) and specify which system you are running it on.
History
Date User Action Args
2022-04-11 14:58:54adminsetgithub: 76172
2022-01-24 18:21:18iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg411501

resolution: out of date
stage: resolved
2017-11-09 13:48:13tomMoralcreate