From 8c52515eaa82330581e06751631f07e8ebed180e Mon Sep 17 00:00:00 2001 From: kosaki Date: Tue, 19 Mar 2013 18:26:27 +0000 Subject: * thread.c (ruby_kill): added a few comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ thread.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 408893e112..698486131e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Mar 16 03:39:38 2013 KOSAKI Motohiro + + * thread.c (ruby_kill): added a few comments. + Sat Mar 16 03:36:56 2013 KOSAKI Motohiro * thread.c (ruby_kill): release GVL while waiting signal delivered. diff --git a/thread.c b/thread.c index 9f723d0d64..dce0ca800f 100644 --- a/thread.c +++ b/thread.c @@ -5210,6 +5210,10 @@ ruby_kill(rb_pid_t pid, int sig) 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); -- cgit v1.2.1