Thomas Rachel added the comment:
Here is another patch which fits to 2.7, if desired.
--
Added file: http://bugs.python.org/file21496/threading.b36cb4602e21.patch
___
Python tracker
<http://bugs.python.org/issue11
Thomas Rachel added the comment:
Oops, sorry. I have re-made it; it is to be applied to 69f58be4688a.
The original one was made against the respective file of my distribution which
contains Python 2.6. It can be applied to (at least) 787b969d37f0, a fact which
might help backporting it to 2
Thomas Rachel added the comment:
Of course.
I hope it is correct, and I hop it is ok when I change to use "with ...:" on
the other places I consider it useful as well...
--
keywords: +patch
type: -> behavior
Added file: http://bugs.python.org/file21460/th
Thomas Rachel 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
New submission from Thomas Rachel :
The acquire() and release() functions of threading.Semaphore do not make use of
the try...finally suite as it would be reasonable.
They just do
def acquire(self, blocking=1):
rc = False
self.__cond.acquire()
[...]
self