summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 4adeb4c..833b9b0 100644
--- a/eval.c
+++ b/eval.c
@@ -7149,7 +7149,11 @@ rb_thread_schedule()
}
FOREACH_THREAD_FROM(curr, th) {
- if (th->status <= THREAD_RUNNABLE) {
+ if (th->status == THREAD_TO_KILL) {
+ next = th;
+ break;
+ }
+ if (th->status == THREAD_RUNNABLE) {
if (!next || next->priority < th->priority)
next = th;
}