You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interpreter starts shutting down immediately after w.start(). In the default build, this is usually OK because the GIL switching interval (and limited eval breaker checks) means that the os.fork() call likely happens before the w.start() returns, but there is no guarantee of that. In the free-threaded build, this is much more likely to raise a PythonFinalizationError: can't fork at interpreter shutdown error because the w.start() call returns more quickly.
The
test_3_join_in_forked_from_thread
test case intest_threading.py
may call fork during shutdown:cpython/Lib/test/test_threading.py
Lines 1273 to 1275 in 113053a
The relevant code looks like:
The interpreter starts shutting down immediately after
w.start()
. In the default build, this is usually OK because the GIL switching interval (and limited eval breaker checks) means that theos.fork()
call likely happens before thew.start()
returns, but there is no guarantee of that. In the free-threaded build, this is much more likely to raise aPythonFinalizationError: can't fork at interpreter shutdown
error because thew.start()
call returns more quickly.See also #114570
The text was updated successfully, but these errors were encountered: