Skip to content

Commit 5a90de0

Browse files
authored
gh-116749: Disable GIL by default in free-threaded build (#118295)
Switch GIL to disabled by default in free-threaded build so that the free-threaded CIs catch thread-safety issues.
1 parent 3e06c7f commit 5a90de0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Python/ceval_gil.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,7 @@ init_own_gil(PyInterpreterState *interp, struct _gil_runtime_state *gil)
451451
{
452452
assert(!gil_created(gil));
453453
#ifdef Py_GIL_DISABLED
454-
// gh-116329: Once it is safe to do so, change this condition to
455-
// (enable_gil == _PyConfig_GIL_ENABLE), so the GIL is disabled by default.
456-
gil->enabled = _PyInterpreterState_GetConfig(interp)->enable_gil != _PyConfig_GIL_DISABLE;
454+
gil->enabled = _PyInterpreterState_GetConfig(interp)->enable_gil == _PyConfig_GIL_ENABLE;
457455
#endif
458456
create_gil(gil);
459457
assert(gil_created(gil));

0 commit comments

Comments
 (0)