summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--thread.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fca5dae5c7..408893e112 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sat Mar 16 03:36:56 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (ruby_kill): release GVL while waiting signal delivered.
+
Tue Mar 19 19:50:48 2013 NAKAMURA Usaku <usa@ruby-lang.org>
* ruby_kill (internal.h, thread.c): use rb_pid_t instead of pid_t.
diff --git a/thread.c b/thread.c
index 37e805358a..9f723d0d64 100644
--- a/thread.c
+++ b/thread.c
@@ -5211,10 +5211,12 @@ ruby_kill(rb_pid_t pid, int sig)
rb_vm_t *vm = GET_VM();
if ((th == vm->main_thread) && (pid == getpid())) {
+ GVL_UNLOCK_BEGIN();
native_mutex_lock(&th->interrupt_lock);
err = kill(pid, sig);
native_cond_wait(&th->interrupt_cond, &th->interrupt_lock);
native_mutex_unlock(&th->interrupt_lock);
+ GVL_UNLOCK_END();
} else {
err = kill(pid, sig);
}