mirror of
https://github.com/python/cpython.git
synced 2025-09-30 12:21:51 +00:00
test_bare_raise_in_brand_new_thread() now explicitly breaks a
reference cycle to not leak a dangling thread.
(cherry picked from commit 3d284c081f
)
This commit is contained in:
parent
3e866dfaec
commit
b50e7683ac
1 changed files with 2 additions and 0 deletions
|
@ -1066,6 +1066,8 @@ class ThreadingExceptionTests(BaseTestCase):
|
||||||
thread.join()
|
thread.join()
|
||||||
self.assertIsNotNone(thread.exc)
|
self.assertIsNotNone(thread.exc)
|
||||||
self.assertIsInstance(thread.exc, RuntimeError)
|
self.assertIsInstance(thread.exc, RuntimeError)
|
||||||
|
# explicitly break the reference cycle to not leak a dangling thread
|
||||||
|
thread.exc = None
|
||||||
|
|
||||||
class TimerTests(BaseTestCase):
|
class TimerTests(BaseTestCase):
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue