From 61430a167b3f562ffbaeb3bbbf68d33b907881d0 Mon Sep 17 00:00:00 2001 From: kosaki Date: Thu, 24 Oct 2013 03:25:25 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ thread.c | 5 +++++ 2 files changed, 10 insertions(+) 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 + + * 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 * 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; }