Skip to content

Commit

Permalink
Use sequential consistency for operations on state
Browse files Browse the repository at this point in the history
  • Loading branch information
mpage committed Feb 14, 2024
1 parent 147a192 commit 1fe27ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modules/_threadmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ typedef struct {
static inline int
get_thread_handle_state(ThreadHandleObject *handle)
{
return _Py_atomic_load_int_relaxed(&handle->state);
return _Py_atomic_load_int(&handle->state);
}

static inline void
set_thread_handle_state(ThreadHandleObject *handle, ThreadHandleState state)
{
_Py_atomic_store_int_relaxed(&handle->state, state);
_Py_atomic_store_int(&handle->state, state);
}

static ThreadHandleObject*
Expand Down

0 comments on commit 1fe27ce

Please sign in to comment.