[issue18078] threading.Condition to allow notify on a specific waiter

João Bernardo report at bugs.python.org
Tue May 28 19:32:37 CEST 2013


João Bernardo added the comment:

> Condition.wait_for_any() would create a single inner lock and add it 
> to the _waiters list for each of the condition variables

Now I see your point!
Could it also have one (optional) argument so I can provide this lock myself? 

>    while <expr>:
>        cond.wait()
> This allows the woken thread to check whether it is really supposed
> to continue --

Yes, I use that, but sometimes I have the thread just waiting for cleanup time and there's no need to check a condition. This is one my use cases though... You may want it to be more generic.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18078>
_______________________________________


More information about the Python-bugs-list mailing list