summaryrefslogtreecommitdiffstats
path: root/Python/ceval_gil.c
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2024-04-26 18:22:29 (GMT)
committerGitHub <noreply@github.com>2024-04-26 18:22:29 (GMT)
commit5a90de0d4cbc151a6deea36a27eb81b192410e56 (patch)
tree88e6dadeb041f6ac5e5f9952009a4a71fb0f4796 /Python/ceval_gil.c
parent3e06c7f719b99cc7f5e8889319cff4980e41d3e8 (diff)
downloadcpython-5a90de0d4cbc151a6deea36a27eb81b192410e56.zip
cpython-5a90de0d4cbc151a6deea36a27eb81b192410e56.tar.gz
cpython-5a90de0d4cbc151a6deea36a27eb81b192410e56.tar.bz2
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.
Diffstat (limited to 'Python/ceval_gil.c')
-rw-r--r--Python/ceval_gil.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/ceval_gil.c b/Python/ceval_gil.c
index c3c2c54..fdbb488 100644
--- a/Python/ceval_gil.c
+++ b/Python/ceval_gil.c
@@ -451,9 +451,7 @@ init_own_gil(PyInterpreterState *interp, struct _gil_runtime_state *gil)
{
assert(!gil_created(gil));
#ifdef Py_GIL_DISABLED
- // gh-116329: Once it is safe to do so, change this condition to
- // (enable_gil == _PyConfig_GIL_ENABLE), so the GIL is disabled by default.
- gil->enabled = _PyInterpreterState_GetConfig(interp)->enable_gil != _PyConfig_GIL_DISABLE;
+ gil->enabled = _PyInterpreterState_GetConfig(interp)->enable_gil == _PyConfig_GIL_ENABLE;
#endif
create_gil(gil);
assert(gil_created(gil));