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

ruby-changes:27776

From: kosaki <ko1@a...>
Date: Wed, 20 Mar 2013 03:26:41 +0900 (JST)
Subject: [ruby-changes:27776] kosaki:r39828 (trunk): * thread.c (ruby_kill): added a few comments.

kosaki	2013-03-20 03:26:27 +0900 (Wed, 20 Mar 2013)

  New Revision: 39828

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

  Log:
    * thread.c (ruby_kill): added a few comments.

  Modified files:
    trunk/ChangeLog
    trunk/thread.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39827)
+++ ChangeLog	(revision 39828)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Mar 16 03:39:38 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* thread.c (ruby_kill): added a few comments.
+
 Sat Mar 16 03:36:56 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* thread.c (ruby_kill): release GVL while waiting signal delivered.
Index: thread.c
===================================================================
--- thread.c	(revision 39827)
+++ thread.c	(revision 39828)
@@ -5210,6 +5210,10 @@ ruby_kill(rb_pid_t pid, int sig) https://github.com/ruby/ruby/blob/trunk/thread.c#L5210
     rb_thread_t *th = GET_THREAD();
     rb_vm_t *vm = GET_VM();
 
+    /*
+     * When target pid is self, many caller assume signal will be
+     * delivered immediately and synchronously.
+     */
     if ((th == vm->main_thread) && (pid == getpid())) {
 	GVL_UNLOCK_BEGIN();
 	native_mutex_lock(&th->interrupt_lock);

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

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