1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Ensure execution context is cleared after thread is finished.

This commit is contained in:
Samuel Williams 2019-06-05 20:52:07 +12:00
parent 38791145eb
commit 4b3b781c66
2 changed files with 1 additions and 4 deletions

View file

@ -821,7 +821,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
rb_threadptr_unlock_all_locking_mutexes(th);
rb_check_deadlock(th->vm);
// rb_fiber_close(th->ec->fiber_ptr);
rb_ec_set_vm_stack(th->ec, NULL, 0);
}
thread_cleanup_func(th, FALSE);
gvl_release(th->vm);

3
vm.c
View file

@ -2704,9 +2704,6 @@ th_init(rb_thread_t *th, VALUE self)
0 /* dummy cref/me */,
0 /* dummy pc */, th->ec->vm_stack, 0, 0
);
} else {
th->ec->cfp = NULL;
rb_ec_set_vm_stack(th->ec, NULL, 0);
}
th->status = THREAD_RUNNABLE;