You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/brettcannon'closed_at=<Date2005-11-23.02:22:06.000>created_at=<Date2005-10-06.02:18:54.000>labels= ['library']
title='ensure lock is released if exception is raised'updated_at=<Date2005-11-23.02:22:06.000>user='https://bugs.python.org/eblossom'
If an exception (typically KeyboardInterrupt) is raised
in Thread.join, self.__block will be left locked, and
any later attempt to join will block forever. The bug
is easy to trigger if you provide a timeout to join.
This patch ensures that the lock is released.
rev. 41524 (2.5) and rev. 41525 (2.4) have the fix. I am
really looking forward to the 'with' statement and having
all of the locks in 'threading' support it. Then this kind
of thing will be avoided.
Also, so it is documented, to trigger this, do the following::
importthreadingimporttimeth=threading.Thread(target=lambda: time.sleep(5.0))
th.start()
th.join('blah')
th.join# Used to hang
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: