* 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:
parent
df4fcd343f
commit
8c52515eaa
@ -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>
|
Sat Mar 16 03:36:56 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
* thread.c (ruby_kill): release GVL while waiting signal delivered.
|
* thread.c (ruby_kill): release GVL while waiting signal delivered.
|
||||||
|
4
thread.c
4
thread.c
@ -5210,6 +5210,10 @@ ruby_kill(rb_pid_t pid, int sig)
|
|||||||
rb_thread_t *th = GET_THREAD();
|
rb_thread_t *th = GET_THREAD();
|
||||||
rb_vm_t *vm = GET_VM();
|
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())) {
|
if ((th == vm->main_thread) && (pid == getpid())) {
|
||||||
GVL_UNLOCK_BEGIN();
|
GVL_UNLOCK_BEGIN();
|
||||||
native_mutex_lock(&th->interrupt_lock);
|
native_mutex_lock(&th->interrupt_lock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user