diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-19 18:26:27 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-19 18:26:27 +0000 |
commit | 8c52515eaa82330581e06751631f07e8ebed180e (patch) | |
tree | c8bf887efe40660fc8ca7949074544c2907046c3 | |
parent | df4fcd343f973aee316677d40035c02be4a61a19 (diff) | |
download | ruby-8c52515eaa82330581e06751631f07e8ebed180e.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | thread.c | 4 |
2 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Sat Mar 16 03:39:38 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com> + + * thread.c (ruby_kill): added a few comments. + Sat Mar 16 03:36:56 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com> * thread.c (ruby_kill): release GVL while waiting signal delivered. @@ -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); |