Skip to content

Commit 4f1d583

Browse files
benoittgtjhawthorn
authored andcommitted
Permit thread state SUSPENDED to go to STOPPED
Otherwise you can have exception like : ``` Assertion Failed: vernier.cc:857:set_state:state == State::RUNNING || state == State::STARTED ```
1 parent 936f9bd commit 4f1d583

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/vernier/vernier.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -853,8 +853,8 @@ class Thread {
853853
markers->record_interval(Marker::Type::MARKER_THREAD_RUNNING, from, now);
854854
break;
855855
case State::STOPPED:
856-
// We can go from RUNNING or STARTED to STOPPED
857-
assert(state == State::RUNNING || state == State::STARTED);
856+
// We can go from RUNNING or STARTED or SUSPENDED to STOPPED
857+
assert(state == State::RUNNING || state == State::STARTED || state == State::SUSPENDED);
858858
markers->record_interval(Marker::Type::MARKER_THREAD_RUNNING, from, now);
859859
markers->record(Marker::Type::MARKER_GVL_THREAD_EXITED);
860860

0 commit comments

Comments
 (0)