Skip to content

Commit 191f33d

Browse files
gh-178: Fix race condition caused by async PAUSE timer.
1 parent 01f16e5 commit 191f33d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/value.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ void value_thr_set_finished(Value v, int finished) {
9494
if (v.type != VAL_THR || !v.as.thr) return;
9595
mtx_lock(&v.as.thr->state_lock);
9696
v.as.thr->finished = finished ? 1 : 0;
97+
if (finished) {
98+
v.as.thr->paused = 0;
99+
}
97100
mtx_unlock(&v.as.thr->state_lock);
98101
}
99102

0 commit comments

Comments
 (0)