Actions
Bug #1499
closedCommit 22478 has "that can't be right!" defect in rb_thread_schedule.
Description
=begin
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_7/eval.c?view=diff&r1=22477&r2=22478
-
if (th == th_found) {
-
th_found->status = THREAD_RUNNABLE;
-
th_found->wait_for = 0;
-
if (th->wait_for&WAIT_FD) {
-
th_found->fd = 0;
-
}
-
else { /* th->wait_for&WAIT_SELECT */
-
n = intersect_fds(&readfds, &th_found->readfds, max) +
-
intersect_fds(&writefds, &th_found->writefds, max) +
-
intersect_fds(&exceptfds, &th_found->exceptfds, max);
-
th_found->select_value = n;
-
}
-
}
-
next = th;
but but since th == th_found
-
th_found->wait_for = 0;
-
if (th->wait_for&WAIT_FD) {
means that if is ALWAYS going to fail!
I'm not sure what the correct code is... but I'm guessing it is move the th->wait_for = 0 to after the ifs.
=end
Actions
Like0
Like0Like0