mirror of https://github.com/python/cpython
bpo-31234: test_threading: fix ref cycle (#3150)
test_bare_raise_in_brand_new_thread() now explicitly breaks a reference cycle to not leak a dangling thread.
This commit is contained in:
parent
a32e40561a
commit
3d284c081f
|
@ -1069,6 +1069,8 @@ class ThreadingExceptionTests(BaseTestCase):
|
|||
thread.join()
|
||||
self.assertIsNotNone(thread.exc)
|
||||
self.assertIsInstance(thread.exc, RuntimeError)
|
||||
# explicitly break the reference cycle to not leak a dangling thread
|
||||
thread.exc = None
|
||||
|
||||
class TimerTests(BaseTestCase):
|
||||
|
||||
|
|
Loading…
Reference in New Issue