aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-12-23 14:40:58 +0900
committerKoichi Sasada <ko1@atdot.net>2020-12-23 14:41:44 +0900
commit0dd4896175f95c4c2a26d91a97b9fcb9a74cc0c6 (patch)
treef69610f2401c29088bf182eb5f33cf9df153828d /thread.c
parent5cf25c55a69264138179f7c955d149a154b50458 (diff)
downloadruby-0dd4896175f95c4c2a26d91a97b9fcb9a74cc0c6.tar.gz
need to clear blocking cnt at fork (child process)
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index a7cd6e4c28..354ddd860f 100644
--- a/thread.c
+++ b/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);