mirror of
https://github.com/python/cpython.git
synced 2025-10-05 14:41:07 +00:00
bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-329)
This commit is contained in:
parent
b7fb1e25c8
commit
8400ae209b
3 changed files with 9 additions and 0 deletions
|
@ -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"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue