* thread.c (rb_threadptr_execute_interrupts_common): remove

meaningless native_thread_yield(). It never close a race.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2011-06-29 17:55:03 +00:00
parent c90ff68d32
commit 6f1ce28d62
2 changed files with 5 additions and 4 deletions

View File

@ -1,3 +1,8 @@
Thu Jun 30 02:53:26 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* thread.c (rb_threadptr_execute_interrupts_common): remove
meaningless native_thread_yield(). It never close a race.
Thu Jun 30 02:41:47 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com> Thu Jun 30 02:41:47 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* thread.c (rb_thread_schedule_limits): minor optimization. * thread.c (rb_thread_schedule_limits): minor optimization.

View File

@ -1263,10 +1263,6 @@ rb_threadptr_execute_interrupts_common(rb_thread_t *th)
{ {
rb_atomic_t interrupt; rb_atomic_t interrupt;
if (GET_VM()->main_thread == th) {
while (rb_signal_buff_size() && !th->exec_signal) native_thread_yield();
}
if (th->raised_flag) return; if (th->raised_flag) return;
while ((interrupt = ATOMIC_EXCHANGE(th->interrupt_flag, 0)) != 0) { while ((interrupt = ATOMIC_EXCHANGE(th->interrupt_flag, 0)) != 0) {