[New-bugs-announce] [issue40871] threading.Event.wait_unset()
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)
nosy: Jacob Kunnappally
versions: Python 3.10
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce