[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

Tim Golden report at bugs.python.org
Thu May 8 12:15:38 CEST 2014


Tim Golden added the comment:

I can confirm that the attached test.py times out after 2150 seconds (ie
30+ minutes) with your (tweaked) patch applied:

python test.py 2150

Running Debug|Win32 interpreter...
2014-05-08 10:33:53.670091
Expected to time out by 2014-05-08 11:09:43.670091
Timed Out
2014-05-08 11:09:43.765079

I don't see us adding a test which would lengthen the test suite run by
more than 30 minutes!

----------
Added file: http://bugs.python.org/file35184/test.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20737>
_______________________________________
-------------- next part --------------
import sys
import threading
import datetime

now = datetime.datetime.now()
print(now)
seconds_to_wait = int(sys.argv[1])
expected_to_finish = now + datetime.timedelta(seconds=seconds_to_wait)
print("Expected to time out by", expected_to_finish)
print("Event Fired" if threading.Event().wait(seconds_to_wait) else "Timed Out")
print(datetime.datetime.now())


More information about the Python-bugs-list mailing list