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

ruby-changes:26329

From: kosaki <ko1@a...>
Date: Sat, 15 Dec 2012 00:12:11 +0900 (JST)
Subject: [ruby-changes:26329] kosaki:r38380 (trunk): * signal.c (rb_f_kill): remove rb_thread_polling() because this

kosaki	2012-12-15 00:11:59 +0900 (Sat, 15 Dec 2012)

  New Revision: 38380

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

  Log:
    * signal.c (rb_f_kill): remove rb_thread_polling() because this
      has no good effect and makes meaningless 100ms delay. 1)
      when sending signal to another process, waiting has just silly.
      2) when sending signal to current process, 100ms is often not
      enough time to wait. It depend on kernel behavior. And,
      rb_thread_polling() doesn't make sense anyway. When rb_thread_alone()
      is true, it doesn't wait at all and Process.kill() users don't
      expect threading changes Process.kill() behavior. [Bug #7560]

  Modified files:
    trunk/ChangeLog
    trunk/signal.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38379)
+++ ChangeLog	(revision 38380)
@@ -1,3 +1,14 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Dec 15 00:03:31 2012  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* signal.c (rb_f_kill): remove rb_thread_polling() because this
+	  has no good effect and makes meaningless 100ms delay. 1)
+	  when sending signal to another process, waiting has just silly.
+	  2) when sending signal to current process, 100ms is often not
+	  enough time to wait. It depend on kernel behavior. And,
+	  rb_thread_polling() doesn't make sense anyway. When rb_thread_alone()
+	  is true, it doesn't wait at all and Process.kill() users don't
+	  expect threading changes Process.kill() behavior. [Bug #7560]
+
 Fri Dec 14 17:10:57 2012  Nobuyoshi Nakada  <nobu@r...>
 
 	* parse.y (parser_params): parser_tokline to track the line number at
Index: signal.c
===================================================================
--- signal.c	(revision 38379)
+++ signal.c	(revision 38380)
@@ -425,7 +425,6 @@ rb_f_kill(int argc, VALUE *argv) https://github.com/ruby/ruby/blob/trunk/signal.c#L425
 		rb_sys_fail(0);
 	}
     }
-    rb_thread_polling();
     return INT2FIX(i-1);
 }
 

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

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