Kristján Valur Jónsson added the comment: 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20737> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com