summaryrefslogtreecommitdiff
path: root/Lib/threading.py
diff options
context:
space:
mode:
authorAntoine Pitrou <pitrou@free.fr>2017-10-02 16:42:15 +0200
committerGitHub <noreply@github.com>2017-10-02 16:42:15 +0200
commit1023dbbcb7f05e76053486ae7ef7f73b4cdc5398 (patch)
tree3588990f6fdc88663ac88814ad02840e4c1856bd /Lib/threading.py
parente6f62f69f07892b993910ff03c9db3ffa5cb9ca5 (diff)
downloadcpython-git-1023dbbcb7f05e76053486ae7ef7f73b4cdc5398.tar.gz
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.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/threading.py b/Lib/threading.py
index e4bf974495..418116face 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():