Message218047
changing long to DWORD doesn't really fix the overflow issue.
The fundamental problem is that some of the apis, e.g. WaitForSingleObject have a DWORD maximum. so, we cannot support sleep times longer than some particular time.
Microseconds was chosen in the api because that is the resolution of the api in pthreads.
IMHO, I think it is okay to have an implicit ceiling on the timeout, e.g. some 4000 seconds. We can add a caveat somewhere that anyone intending to sleep for extended periods of time should be prepared for a timeout occurring early, and should have his own timing logic to deal with that.
My suggestion then is to
a) change the apis to DWORD
b) add a macro something like PyCOND_MAX_WAIT set to 2^32-1
c) properly clip the argument where we call this cunfion, e.g. in lock.acquire. |
|
Date |
User |
Action |
Args |
2014-05-07 11:06:21 | kristjan.jonsson | set | recipients:
+ kristjan.jonsson, pitrou, tim.golden, r.david.murray, brian.curtin, alex.gronholm, raruler |
2014-05-07 11:06:20 | kristjan.jonsson | set | messageid: <1399460780.98.0.01905856966.issue20737@psf.upfronthosting.co.za> |
2014-05-07 11:06:20 | kristjan.jonsson | link | issue20737 messages |
2014-05-07 11:06:20 | kristjan.jonsson | create | |
|