summaryrefslogtreecommitdiff
path: root/ractor.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-11-10 18:21:11 +0900
committerKoichi Sasada <ko1@atdot.net>2020-11-11 15:49:02 +0900
commitdb31ace934e8b900e90853bd875f23195837b398 (patch)
treef9e1e0999b574c0adf974e885420781b2dbd5a15 /ractor.c
parent1e8abe5d03ae386af82e2c95ef05170cd9791889 (diff)
Threads in a ractor will be killed with the ractor
If a terminating ractor has child threads, then kill all child threads.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3754
Diffstat (limited to 'ractor.c')
-rw-r--r--ractor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ractor.c b/ractor.c
index c30f5ce6c2..350e9c7b3f 100644
--- a/ractor.c
+++ b/ractor.c
@@ -1591,7 +1591,7 @@ rb_ractor_terminate_interrupt_main_thread(rb_ractor_t *r)
}
}
-void rb_thread_terminate_all(void); // thread.c
+void rb_thread_terminate_all(rb_thread_t *th); // thread.c
static void
ractor_terminal_interrupt_all(rb_vm_t *vm)
@@ -1620,7 +1620,7 @@ rb_ractor_terminate_all(void)
ractor_terminal_interrupt_all(vm); // kill all ractors
RB_VM_UNLOCK();
}
- rb_thread_terminate_all(); // kill other threads in main-ractor and wait
+ rb_thread_terminate_all(GET_THREAD()); // kill other threads in main-ractor and wait
RB_VM_LOCK();
{