* 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
This commit is contained in:
kosaki 2013-03-19 18:26:27 +00:00
parent df4fcd343f
commit 8c52515eaa
2 changed files with 8 additions and 0 deletions

View File

@ -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.

View File

@ -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);