[前][次][番号順一覧][スレッド一覧]

ruby-changes:64507

From: Koichi <ko1@a...>
Date: Wed, 23 Dec 2020 14:43:42 +0900 (JST)
Subject: [ruby-changes:64507] 0dd4896175 (master): need to clear blocking cnt at fork (child process)

https://git.ruby-lang.org/ruby.git/commit/?id=0dd4896175

From 0dd4896175f95c4c2a26d91a97b9fcb9a74cc0c6 Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Wed, 23 Dec 2020 14:40:58 +0900
Subject: need to clear blocking cnt at fork (child process)


diff --git a/thread.c b/thread.c
index a7cd6e4..354ddd8 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 https://github.com/ruby/ruby/blob/trunk/thread.c#L4743
 
     // 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);
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]