[issue18078] threading.Condition to allow notify on a specific waiter
Richard Oudkerk
report at bugs.python.org
Wed Jul 24 17:47:12 CEST 2013
Richard Oudkerk added the comment:
IMHO
1) It should check all predicates.
2) It should return a list of ready conditions.
3) It should *not* accept a list of conditions.
4) from_condition() should be removed.
Also notify() should try again if releasing a waiter raises RuntimeError because it has already been released. Otherwise notify() can be a noop even when there are threads waiting on the condition.
I would also put
for cond in conditions:
cond._remove_waiter(waiter)
in wait_for_any() in to a finally clause in case the wait was interrupted by KeyboardInterrupt. (Accounting for KeyboardInterrupt everywhere is not feasible, but for blocking calls which can be interrupted I think we should try.)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18078>
_______________________________________
More information about the Python-bugs-list
mailing list