summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-05 08:46:59 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-05 08:46:59 +0000
commitecd1aab5266315f947b0568cb56fab4f63453c83 (patch)
tree01d36aee863b377fd1d10902e134e4483d647597 /eval.c
parent76d09411e9db597c537bd39124db47cde2d6f3c4 (diff)
2000-06-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 814924b83a..5c9d16967f 100644
--- a/eval.c
+++ b/eval.c
@@ -6880,7 +6880,7 @@ rb_thread_schedule()
}
FOREACH_THREAD_FROM(curr, th) {
- if (!next && (th->status <= THREAD_RUNNABLE)) {
+ if (th->status <= THREAD_RUNNABLE) {
if (!next || next->priority < th->priority)
next = th;
}
@@ -7283,6 +7283,7 @@ rb_thread_priority_set(thread, prio)
th = rb_thread_check(thread);
th->priority = NUM2INT(prio);
+ rb_thread_schedule();
return thread;
}
@@ -7643,6 +7644,7 @@ rb_thread_cleanup()
if (th != curr_thread && th->status != THREAD_KILLED) {
rb_thread_ready(th);
th->gid = 0;
+ th->priority = 0;
th->status = THREAD_TO_KILL;
}
}