summaryrefslogtreecommitdiff
path: root/thread.c
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 /thread.c
parent30edf111c5f409e161ec4ff9c4f4d659f2deaf54 (diff)
* 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
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;
}