[issue11714] threading.Semaphore does not use try...finally
Thomas Rachel
report at bugs.python.org
Tue Mar 29 22:28:22 CEST 2011
Thomas Rachel <th.rachel at googlemail.com> added the comment:
I wonder if it is right what I wrote. After a second thought, the acquire() should come *after* try:, as well in threading.Event. Because if Ctrl-C is pressed while waiting in acquire(), a KeyboardInterrupt is thrown immediately after returning from acquire(). This lock must be release()d again in order to be consistent.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11714>
_______________________________________
More information about the Python-bugs-list
mailing list