ruby-changes:31331
From: kosaki <ko1@a...>
Date: Thu, 24 Oct 2013 12:16:06 +0900 (JST)
Subject: [ruby-changes:31331] kosaki:r43410 (trunk): * thread.c (rb_thread_terminate_all): add a comment why infinite
kosaki 2013-10-24 12:15:58 +0900 (Thu, 24 Oct 2013) New Revision: 43410 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43410 Log: * thread.c (rb_thread_terminate_all): add a comment why infinite sleep is safe. Modified files: trunk/ChangeLog trunk/thread.c Index: ChangeLog =================================================================== --- ChangeLog (revision 43409) +++ ChangeLog (revision 43410) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Oct 24 12:15:02 2013 KOSAKI Motohiro <kosaki.motohiro@g...> + + * thread.c (rb_thread_terminate_all): add a comment why infinite + sleep is safe. + Thu Oct 24 07:41:42 2013 Aman Gupta <ruby@t...> * gc.c: add new initial_growth_max tuning parameter. Index: thread.c =================================================================== --- thread.c (revision 43409) +++ thread.c (revision 43410) @@ -440,6 +440,10 @@ rb_thread_terminate_all(void) https://github.com/ruby/ruby/blob/trunk/thread.c#L440 TH_PUSH_TAG(th); if ((state = TH_EXEC_TAG()) == 0) { + /* + * Thread exiting routine in thread_start_func_2 notify + * me when the last sub-thread exit. + */ native_sleep(th, 0); RUBY_VM_CHECK_INTS_BLOCKING(th); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/