summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 757fca203b..e501f78675 100644
--- a/thread.c
+++ b/thread.c
@@ -449,6 +449,11 @@ rb_thread_terminate_all(void)
}
TH_POP_TAG();
+ /*
+ * When caught an exception (e.g. Ctrl+C), let's broadcast
+ * kill request again to ensure killing all threads even
+ * if they are blocked on sleep, mutex, etc.
+ */
if (state) {
goto retry;
}