summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--thread.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 398e0e6366..96f4e4e40b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Oct 24 12:23:58 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (rb_thread_terminate_all): add a comment why we need
+ state check and call terminate_i again.
+
Thu Oct 24 12:15:02 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* thread.c (rb_thread_terminate_all): add a comment why infinite
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;
}