diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-11-27 10:00:35 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-11-27 10:00:35 +0000 |
commit | 186c8b592a8b5badfd42ff7295c5edb44ef1abdd (patch) | |
tree | 922c6ba9baaf7b140efadfb387c0a0780e544eb6 /eval.c | |
parent | 09a4937b2fcf883fa57af1dfa5d12f605f812970 (diff) |
* marshal.c (w_float): must distinguish -0.0 from 0.0.
* gc.c (gc_mark_all): tweak mark order for little bit better scan.
* gc.c (rb_gc_mark): ditto.
* gc.c (rb_gc): ditto.
* enum.c (sort_by_i): slight performance boost.
* gc.c (gc_mark_rest): should call gc_mark_children(), not gc_mark().
* gc.c (rb_gc_mark): may cause infinite looop.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -7614,6 +7614,9 @@ rb_thread_schedule() copy_fds(&exceptfds, &th->exceptfds, th->fd); if (max < th->fd) max = th->fd; need_select = 1; + if (th->wait_for & WAIT_TIME) { + need_select = 2; + } th->select_value = 0; } if (th->wait_for & WAIT_TIME) { @@ -7673,6 +7676,18 @@ rb_thread_schedule() } END_FOREACH_FROM(curr, th); } + if (n == 0 && need_select == 2) { + if (now < 0.0) now = timeofday(); + FOREACH_THREAD_FROM(curr, th) { + if ((th->wait_for & (WAIT_SELECT|WAIT_TIME)) && th->delay < now) { + th->status = THREAD_RUNNABLE; + th->wait_for = 0; + th->select_value = 0; + found = 1; + } + } + END_FOREACH_FROM(curr, th); + } if (n > 0) { now = -1.0; /* Some descriptors are ready. |