File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2003,7 +2003,7 @@ tstate_try_attach(PyThreadState *tstate)
2003
2003
static void
2004
2004
tstate_set_detached (PyThreadState * tstate , int detached_state )
2005
2005
{
2006
- assert (tstate -> state == _Py_THREAD_ATTACHED );
2006
+ assert (_Py_atomic_load_int_relaxed ( & tstate -> state ) == _Py_THREAD_ATTACHED );
2007
2007
#ifdef Py_GIL_DISABLED
2008
2008
_Py_atomic_store_int (& tstate -> state , detached_state );
2009
2009
#else
@@ -2068,7 +2068,7 @@ static void
2068
2068
detach_thread (PyThreadState * tstate , int detached_state )
2069
2069
{
2070
2070
// XXX assert(tstate_is_alive(tstate) && tstate_is_bound(tstate));
2071
- assert (tstate -> state == _Py_THREAD_ATTACHED );
2071
+ assert (_Py_atomic_load_int_relaxed ( & tstate -> state ) == _Py_THREAD_ATTACHED );
2072
2072
assert (tstate == current_fast_get ());
2073
2073
if (tstate -> critical_section != 0 ) {
2074
2074
_PyCriticalSection_SuspendAll (tstate );
You can’t perform that action at this time.
0 commit comments