[前][次][番号順一覧][スレッド一覧]

ruby-changes:31332

From: kosaki <ko1@a...>
Date: Thu, 24 Oct 2013 12:25:31 +0900 (JST)
Subject: [ruby-changes:31332] kosaki:r43411 (trunk): * thread.c (rb_thread_terminate_all): add a comment why we need

kosaki	2013-10-24 12:25:25 +0900 (Thu, 24 Oct 2013)

  New Revision: 43411

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43411

  Log:
    * thread.c (rb_thread_terminate_all): add a comment why we need
      state check and call terminate_i again.

  Modified files:
    trunk/ChangeLog
    trunk/thread.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43410)
+++ ChangeLog	(revision 43411)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Oct 24 12:23:58 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* 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@g...>
 
 	* thread.c (rb_thread_terminate_all): add a comment why infinite
Index: thread.c
===================================================================
--- thread.c	(revision 43410)
+++ thread.c	(revision 43411)
@@ -449,6 +449,11 @@ rb_thread_terminate_all(void) https://github.com/ruby/ruby/blob/trunk/thread.c#L449
 	}
 	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;
 	}

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]