Message120036
| Author |
kristjan.jonsson |
| Recipients |
georg.brandl, kristjan.jonsson |
| Date |
2010年10月31日.04:46:45 |
| SpamBayes Score |
5.640475e-08 |
| Marked as misclassified |
No |
| Message-id |
<1288500409.32.0.639501337625.issue10260@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The attached patch adds a wait_for method to condition objects.
It can simplify code that uses condition variables since it relieves the user from writing a condition loop. In addition it simplifies timeout logic which otherwise has to correctly deal with non-successful wakeups.
We also modify the barrier to use it, giving more robust timeout behaviour.
(btw, the use of time.time() in threading is unfortunate, since it has low resolution and is affected by a user adjusting the clock. On Windows one would want time.clock(), but that function measures CPU time on unix. Do we need a proper time.wallclock() function available on all platforms?) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年10月31日 04:46:49 | kristjan.jonsson | set | recipients:
+ kristjan.jonsson, georg.brandl |
| 2010年10月31日 04:46:49 | kristjan.jonsson | set | messageid: <1288500409.32.0.639501337625.issue10260@psf.upfronthosting.co.za> |
| 2010年10月31日 04:46:47 | kristjan.jonsson | link | issue10260 messages |
| 2010年10月31日 04:46:47 | kristjan.jonsson | create |
|