[issue10260] Add a threading.Condition.wait_for() method
Kristján Valur Jónsson
report at bugs.python.org
Tue Nov 2 01:29:13 CET 2010
Kristján Valur Jónsson <kristjan at ccpgames.com> added the comment:
Good points, Jeffrey. Documentation can be improved and cond.wait_for(pred) is indeed not guaranteed to wake up when predicate is true unless someone calls notifyAll.
I spent some time thinking of a name. I tried wait_predicate and predicate_wait, but wait_for seemed natural. Any other ideas?
How about wait_until_true?
My original method had this as a free function, but I moved it into the Condition because I could see no other kind of primitive that would use it. I agree that it is unfortunate to pull what is essentially a utility function into the Condition variable, so I am leaning towards keeping it a module function.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10260>
_______________________________________
More information about the Python-bugs-list
mailing list