Skip to content

Commit 1fe27ce

Browse files
committed
Use sequential consistency for operations on state
1 parent 147a192 commit 1fe27ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_threadmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ typedef struct {
8585
static inline int
8686
get_thread_handle_state(ThreadHandleObject *handle)
8787
{
88-
return _Py_atomic_load_int_relaxed(&handle->state);
88+
return _Py_atomic_load_int(&handle->state);
8989
}
9090

9191
static inline void
9292
set_thread_handle_state(ThreadHandleObject *handle, ThreadHandleState state)
9393
{
94-
_Py_atomic_store_int_relaxed(&handle->state, state);
94+
_Py_atomic_store_int(&handle->state, state);
9595
}
9696

9797
static ThreadHandleObject*

0 commit comments

Comments
 (0)