Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Lib/test/test_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ def f(mutex):
self.assertIsInstance(threading._active[tid], threading._DummyThread)
#Issue 29376
self.assertTrue(threading._active[tid].is_alive())
#Issue 35283
self.assertTrue(threading._active[tid].isAlive())
self.assertRegex(repr(threading._active[tid]), '_DummyThread')
del threading._active[tid]

Expand Down
2 changes: 2 additions & 0 deletions Lib/threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,8 @@ def is_alive(self):
assert not self._is_stopped and self._started.is_set()
return True

isAlive = is_alive

def join(self, timeout=None):
assert False, "cannot join a dummy thread"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add the "isAlive" alias for _DummyThread