summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index acec905..5045402 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -2248,7 +2248,8 @@ start_the_world(struct _stoptheworld_state *stw)
PyThreadState *t;
_Py_FOR_EACH_THREAD(stw, i, t) {
if (t != stw->requester) {
- assert(t->state == _Py_THREAD_SUSPENDED);
+ assert(_Py_atomic_load_int_relaxed(&t->state) ==
+ _Py_THREAD_SUSPENDED);
_Py_atomic_store_int(&t->state, _Py_THREAD_DETACHED);
_PyParkingLot_UnparkAll(&t->state);
}