mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* thread.c (rb_thread_execute_interrupts): switch event
should be occur only once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7085729de3
commit
abfd87c230
2 changed files with 6 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Aug 14 06:09:12 2008 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* thread.c (rb_thread_execute_interrupts): switch event
|
||||
should be occur only once.
|
||||
|
||||
Thu Aug 14 05:36:36 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* common.mk: parse.h depends on parse.c.
|
||||
|
|
6
thread.c
6
thread.c
|
@ -1015,16 +1015,13 @@ rb_thread_execute_interrupts(rb_thread_t *th)
|
|||
}
|
||||
|
||||
if (timer_interrupt) {
|
||||
#if USE_NATIVE_THREAD_PRIORITY
|
||||
EXEC_EVENT_HOOK(th, RUBY_EVENT_SWITCH, th->cfp->self, 0, 0);
|
||||
rb_thread_schedule();
|
||||
#else
|
||||
|
||||
if (th->slice > 0) {
|
||||
th->slice--;
|
||||
}
|
||||
else {
|
||||
reschedule:
|
||||
EXEC_EVENT_HOOK(th, RUBY_EVENT_SWITCH, th->cfp->self, 0, 0);
|
||||
rb_thread_schedule();
|
||||
if (th->slice < 0) {
|
||||
th->slice++;
|
||||
|
@ -1034,7 +1031,6 @@ rb_thread_execute_interrupts(rb_thread_t *th)
|
|||
th->slice = th->priority;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue