New submission from Jacob Kunnappally <jjkunnappa...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue40871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to