diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-30 13:52:24 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-30 13:52:24 +0000 |
commit | 2e72d1c3236c8ec1c0cb8f35c1dd6b64fde02fce (patch) | |
tree | 2e2da5207fe5a6a725a3dcb2e55106d9fe8856b4 /thread.c | |
parent | 5d33dad16cc34c39e75f6e61fd469c69c86f8741 (diff) | |
download | ruby-2e72d1c3236c8ec1c0cb8f35c1dd6b64fde02fce.tar.gz |
revert r35486 (add rb_thread_t#yeiling field). because it doesn't help
to close a race.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -1047,10 +1047,8 @@ rb_thread_schedule_limits(unsigned long limits_us) if (th->running_time_us >= limits_us) { thread_debug("rb_thread_schedule/switch start\n"); - th->yielding = 1; RB_GC_SAVE_MACHINE_CONTEXT(th); gvl_yield(th->vm, th); - th->yielding = 0; rb_thread_set_current(th); thread_debug("rb_thread_schedule/switch done\n"); } @@ -3635,9 +3633,7 @@ timer_thread_function(void *arg) rb_vm_t *vm = GET_VM(); /* TODO: fix me for Multi-VM */ /* for time slice */ - if (!vm->running_thread->yielding) { - RUBY_VM_SET_TIMER_INTERRUPT(vm->running_thread); - } + RUBY_VM_SET_TIMER_INTERRUPT(vm->running_thread); /* check signal */ rb_threadptr_check_signal(vm->main_thread); |