8000 gh-116167: Allow disabling the GIL with `PYTHON_GIL=0` or `-X gil=0` by swtaarrs · Pull Request #116338 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-116167: Allow disabling the GIL with PYTHON_GIL=0 or -X gil=0 #116338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 11, 2024
Prev Previous commit
Next Next commit
Fix else brace formatting
  • Loading branch information
swtaarrs committed Mar 6, 2024
commit 9e9d9250bd86190cfe7106ab3754b1386cc4dbf7
6 changes: 4 additions & 2 deletions Python/initconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -1656,9 +1656,11 @@ config_read_env_vars(PyConfig *config)
#ifdef Py_GIL_DISABLED
if (strcmp(gil, "0") == 0) {
config->enable_gil = _PyConfig_GIL_DISABLE;
} else if (strcmp(gil, "1") == 0) {
}
else if (strcmp(gil, "1") == 0) {
config->enable_gil = _PyConfig_GIL_ENABLE;
} else {
}
else {
return _PyStatus_ERR("PYTHON_GIL must be \"0\" or \"1\"");
}
#else
Expand Down
0