We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32e7415 commit 11f7e16Copy full SHA for 11f7e16
Lib/test/test_atexit.py
@@ -52,6 +52,7 @@ def test_atexit_instances(self):
52
@unittest.skipUnless(support.Py_GIL_DISABLED, "only meaningful without the GIL")
53
def test_atexit_thread_safety(self):
54
# GH-126907: atexit was not thread safe on the free-threaded build
55
+ source = """
56
from threading import Thread
57
58
def dummy():
@@ -67,9 +68,14 @@ def thready():
67
68
69
70
threads = [Thread(target=thready) for _ in range(100)]
- with threading_helper.start_threads(threads):
71
- pass
+ for thread in threads:
72
+ thread.start()
73
+
74
75
+ thread.join()
76
+ """
77
78
+ assert_python_ok(textwrap.dedent(source))
79
80
@support.cpython_only
81
class SubinterpreterTest(unittest.TestCase):
0 commit comments