Skip to content

Commit bb7c984

Browse files
committed
Use atomic for read as well
1 parent b04003c commit bb7c984

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/pystate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2832,7 +2832,7 @@ int
28322832
PyGILState_Check(void)
28332833
{
28342834
_PyRuntimeState *runtime = &_PyRuntime;
2835-
if (!runtime->gilstate.check_enabled) {
2835+
if (!_Py_atomic_load_int_relaxed(&runtime->gilstate.check_enabled)) {
28362836
return 1;
28372837
}
28382838

0 commit comments

Comments
 (0)