Message120036
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?) |
|
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 | |
|