Message193659
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.) |
|
Date |
User |
Action |
Args |
2013-07-24 15:47:12 | sbt | set | recipients:
+ sbt, rhettinger, pitrou, neologix, JBernardo |
2013-07-24 15:47:12 | sbt | set | messageid: <1374680832.36.0.91126365736.issue18078@psf.upfronthosting.co.za> |
2013-07-24 15:47:12 | sbt | link | issue18078 messages |
2013-07-24 15:47:11 | sbt | create | |
|