summaryrefslogtreecommitdiffstats
path: root/Lib/threading.py
diff options
context:
space:
mode:
authorXiang Zhang <angwerzx@126.com>2017-02-27 03:01:30 (GMT)
committerGitHub <noreply@github.com>2017-02-27 03:01:30 (GMT)
commitf3a9faba4bad91286b78b498547de928078f55da (patch)
treea28e1037aa0c99fbf0ece82739f9036b209120a4 /Lib/threading.py
parent1f5639c77f736c18fb5a85b4a1850121e25c788e (diff)
downloadcpython-f3a9faba4bad91286b78b498547de928078f55da.zip
cpython-f3a9faba4bad91286b78b498547de928078f55da.tar.gz
cpython-f3a9faba4bad91286b78b498547de928078f55da.tar.bz2
bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-236)
Diffstat (limited to 'Lib/threading.py')
-rw-r--r--Lib/threading.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/threading.py b/Lib/threading.py
index 4829ff4..95978d3 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -1217,6 +1217,10 @@ class _DummyThread(Thread):
def _stop(self):
pass
+ def is_alive(self):
+ assert not self._is_stopped and self._started.is_set()
+ return True
+
def join(self, timeout=None):
assert False, "cannot join a dummy thread"