commit | 4b6c41768a15fc85e3069603ef89344bd97f79af | [log] [tgz] |
---|---|---|
author | Xiang Zhang <angwerzx@126.com> | Mon Feb 27 11:45:42 2017 +0800 |
committer | GitHub <noreply@github.com> | Mon Feb 27 11:45:42 2017 +0800 |
tree | b7a37d5cac439d0ca3b637a7d55a63cb6af21b01 | |
parent | 7e4897a2fb91e49f131a42ed6de88b5185f7dea8 [diff] [blame] |
bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-330)
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 @@ 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"