summaryrefslogtreecommitdiffstats
path: root/Lib/threading.py
diff options
context:
space:
mode:
authorXiang Zhang <angwerzx@126.com>2017-02-27 03:46:37 (GMT)
committerGitHub <noreply@github.com>2017-02-27 03:46:37 (GMT)
commit8400ae209b5fa3d3bdc39d3876eef13d1ea9a72a (patch)
tree3c93b37ec3fe339cf5a963664579907d50e93ee3 /Lib/threading.py
parentb7fb1e25c89a9eb85b95027f4167bc0977687c43 (diff)
downloadcpython-8400ae209b5fa3d3bdc39d3876eef13d1ea9a72a.zip
cpython-8400ae209b5fa3d3bdc39d3876eef13d1ea9a72a.tar.gz
cpython-8400ae209b5fa3d3bdc39d3876eef13d1ea9a72a.tar.bz2
bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-329)
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 06b7b9b..c40d330 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -1215,6 +1215,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"