aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-24 03:25:25 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-24 03:25:25 +0000
commit61430a167b3f562ffbaeb3bbbf68d33b907881d0 (patch)
tree74b8a6d82179becd187a80170f84861f47c15918
parent30edf111c5f409e161ec4ff9c4f4d659f2deaf54 (diff)
downloadruby-61430a167b3f562ffbaeb3bbbf68d33b907881d0.tar.gz
* thread.c (rb_thread_terminate_all): add a comment why we need
state check and call terminate_i again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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;
}