mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
need to clear blocking cnt at fork (child process)
This commit is contained in:
parent
5cf25c55a6
commit
0dd4896175
1 changed files with 2 additions and 1 deletions
3
thread.c
3
thread.c
|
@ -4743,9 +4743,10 @@ rb_thread_atfork_internal(rb_thread_t *th, void (*atfork)(rb_thread_t *, const r
|
|||
|
||||
// threads
|
||||
vm->ractor.cnt = 0;
|
||||
vm->ractor.blocking_cnt = 0;
|
||||
rb_ractor_living_threads_init(th->ractor);
|
||||
rb_ractor_living_threads_insert(th->ractor, th);
|
||||
|
||||
rb_vm_ractor_blocking_cnt_dec(th->vm, th->ractor, __FILE__, __LINE__);
|
||||
|
||||
/* may be held by MJIT threads in parent */
|
||||
rb_native_mutex_initialize(&vm->waitpid_lock);
|
||||
|
|
Loading…
Reference in a new issue