[New-bugs-announce] [issue40871] threading.Event.wait_unset()

Jacob Kunnappally report at bugs.python.org
Fri Jun 5 09:42:51 EDT 2020


New submission from Jacob Kunnappally <jjkunnappally at gmail.com>:

Just requesting a threading.Event.wait_unset(timeout=None) function. I would request the same for multiprocessing.

My use case:

I've made my own class that adds a little bit of IPC plumbing to the base Process class (ChildProcess). Each ChildProcess has a status that it can update to let other threads/processes know what it's doing at the moment. There is a configurable period when that updated status can be considered "fresh". In some cases, I would like a listening process to be able to ignore the "freshness" and only trigger some action only if the status updates while the listening process is waiting for it to update.

To do this, I need to be able to know when the status goes unfresh so that waiting for the status to update can begin in earnest. Right now I am polling manually, and that can't be the right answer.

Happy to clarify the above paragraphs. That's as best as I could think to describe it in text.

----------
components: Library (Lib)
messages: 370761
nosy: Jacob Kunnappally
priority: normal
severity: normal
status: open
title: threading.Event.wait_unset()
type: enhancement
versions: Python 3.10

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


More information about the New-bugs-announce mailing list