From 61430a167b3f562ffbaeb3bbbf68d33b907881d0 Mon Sep 17 00:00:00 2001 From: kosaki Date: Thu, 24 Oct 2013 03:25:25 +0000 Subject: * 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 --- thread.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'thread.c') 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; } -- cgit v1.2.3