mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #14308: Fix an exception when a "dummy" thread is in the threading module's active list after a fork().
This commit is contained in:
parent
c45868ec69
commit
52849bfaa3
3 changed files with 36 additions and 0 deletions
|
@ -605,6 +605,10 @@ class Thread(_Verbose):
|
|||
pass
|
||||
|
||||
def __stop(self):
|
||||
# DummyThreads delete self.__block, but they have no waiters to
|
||||
# notify anyway (join() is forbidden on them).
|
||||
if not hasattr(self, '_Thread__block'):
|
||||
return
|
||||
self.__block.acquire()
|
||||
self.__stopped = True
|
||||
self.__block.notify_all()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue