bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-236)

This commit is contained in:
Xiang Zhang 2017-02-27 11:01:30 +08:00 committed by GitHub
parent 1f5639c77f
commit f3a9faba4b
3 changed files with 9 additions and 0 deletions

View file

@ -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"