diff options
author | Antoine Pitrou <pitrou@free.fr> | 2017-10-02 14:42:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-02 14:42:15 (GMT) |
commit | 1023dbbcb7f05e76053486ae7ef7f73b4cdc5398 (patch) | |
tree | 3588990f6fdc88663ac88814ad02840e4c1856bd /Lib/threading.py | |
parent | e6f62f69f07892b993910ff03c9db3ffa5cb9ca5 (diff) | |
download | cpython-1023dbbcb7f05e76053486ae7ef7f73b4cdc5398.zip cpython-1023dbbcb7f05e76053486ae7ef7f73b4cdc5398.tar.gz cpython-1023dbbcb7f05e76053486ae7ef7f73b4cdc5398.tar.bz2 |
bpo-31516: current_thread() should not return a dummy thread at shutdown (#3673)
bpo-31516: current_thread() should not return a dummy thread at shutdown
Diffstat (limited to 'Lib/threading.py')
-rw-r--r-- | Lib/threading.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/threading.py b/Lib/threading.py index e4bf974..418116f 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -1158,8 +1158,8 @@ class Timer(Thread): self.function(*self.args, **self.kwargs) self.finished.set() + # Special thread class to represent the main thread -# This is garbage collected through an exit handler class _MainThread(Thread): @@ -1272,7 +1272,6 @@ def _shutdown(): while t: t.join() t = _pickSomeNonDaemonThread() - _main_thread._delete() def _pickSomeNonDaemonThread(): for t in enumerate(): |