Author jyasskin
Recipients georg.brandl, jyasskin, kristjan.jonsson, pitrou
Date 2010-11-01.15:22:49
SpamBayes Score 7.13761e-08
Marked as misclassified No
Message-id <1288624971.7.0.093072983961.issue10260@psf.upfronthosting.co.za>
In-reply-to
Content
* This method will confuse some people who will think that cond.wait(pred) will wake up when pred becomes true regardless of whether they call cond.notifyAll(). You should warn them about this in the documentation. (This confusion happens inside Google, despite our documentation, but the method's worth having even though not everyone will read the docs.) You should also mention that 'predicate' runs with the Condition acquired.

Then +1 whether or not you do anything in response to the below comments.

* There's a small risk of confusion with C++0x's wait_for method, which behaves like the current Condition.wait (waiting for a timeout). They used "wait_for" because they also have a "wait_until" that waits until a deadline. I don't think this potential confusion is a big deal.

* This expands the interface needed to duck-type as a Condition. Maybe you could also add a threading.wait_for(Condition, predicate, timeout) that implements the same thing using just the Condition's .wait() method? I'm not certain that'll be the best name as a threading method, but I don't have a better proposal.
History
Date User Action Args
2010-11-01 15:22:51jyasskinsetrecipients: + jyasskin, georg.brandl, pitrou, kristjan.jonsson
2010-11-01 15:22:51jyasskinsetmessageid: <1288624971.7.0.093072983961.issue10260@psf.upfronthosting.co.za>
2010-11-01 15:22:50jyasskinlinkissue10260 messages
2010-11-01 15:22:49jyasskincreate