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

ruby-changes:25816

From: kosaki <ko1@a...>
Date: Tue, 27 Nov 2012 07:50:03 +0900 (JST)
Subject: [ruby-changes:25816] kosaki:r37873 (trunk): * thread.c (rb_thread_terminate_all): add RUBY_VM_CHECK_INTS_BLOCKING().

kosaki	2012-11-27 07:49:36 +0900 (Tue, 27 Nov 2012)

  New Revision: 37873

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

  Log:
    * thread.c (rb_thread_terminate_all): add RUBY_VM_CHECK_INTS_BLOCKING().
      Otherwise the loop in this function behave as busy loop because
      native_sleep() return immediately when RUBY_VM_INTERRUPTED() is true.

  Modified files:
    trunk/ChangeLog
    trunk/thread.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37872)
+++ ChangeLog	(revision 37873)
@@ -1,3 +1,9 @@
+Tue Nov 27 07:47:09 2012  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* thread.c (rb_thread_terminate_all): add RUBY_VM_CHECK_INTS_BLOCKING().
+	  Otherwise the loop in this function behave as busy loop because
+	  native_sleep() return immediately when RUBY_VM_INTERRUPTED() is true.
+
 Tue Nov 27 04:12:49 2012  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/extmk.rb (extmake): git rid of post-1.8 features for cross
Index: thread.c
===================================================================
--- thread.c	(revision 37872)
+++ thread.c	(revision 37873)
@@ -386,6 +386,7 @@
 	PUSH_TAG();
 	if (EXEC_TAG() == 0) {
 	    native_sleep(th, 0);
+	    RUBY_VM_CHECK_INTS_BLOCKING(th);
 	}
 	else {
 	    /* ignore exception */

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

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