Issue #4911 has been updated by kosaki (Motohiro KOSAKI).


????Comment#4?????????????????念????????????????????????????解?????????????????????????????????????????????代??????????????????????????thread_free() ?????????????????????????
----------------------------------------
Bug #4911: timer_thread_function() ??? thead unsafe
https://bugs.ruby-lang.org/issues/4911#change-29661

Author: kosaki (Motohiro KOSAKI)
Status: Assigned
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: 2.0.0
ruby -v: trunk


???????????????????????????????????????????????????????????罪???????????????????????
target 1.9.x ??起票?????????

timer_thread_function()??? vm->running_thread ???????????????
thread unsafe ??????????????

????????A??running_thread???????
?????????????????vm->running_thread???????????????
    ??????????????A??????????????????
??????????????????
????????A???????????????B??running_thread?????
????????A?? rb_thead_t ???free?????????
??????????????????
???????????????????????????????????????????????????A??
    ????????対?????? th->interrupt_flag |= 1; ???????????????

----------------------------------------------------------
static void
timer_thread_function(void *arg)
{
    rb_vm_t *vm = GET_VM(); /* TODO: fix me for Multi-VM */

    /* for time slice */
    RUBY_VM_SET_TIMER_INTERRUPT(vm->running_thread);      ???????

    /* check signal */
    rb_threadptr_check_signal(vm->main_thread);
}


-- 
http://bugs.ruby-lang.org/