* thread_win32.c (w32_wait_events): get GVL before handle interrupt
event. [ruby-core:27199], [ruby-core:29698] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
690e065bf8
commit
bd21118627
@ -1,3 +1,8 @@
|
|||||||
|
Wed May 5 20:37:54 2010 wanabe <s.wanabe@gmail.com>
|
||||||
|
|
||||||
|
* thread_win32.c (w32_wait_events): get GVL before handle interrupt
|
||||||
|
event. [ruby-core:27199], [ruby-core:29698]
|
||||||
|
|
||||||
Wed May 5 19:00:01 2010 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
Wed May 5 19:00:01 2010 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
* ext/tk/extconf.rb: revert. enbugged by last commit.
|
* ext/tk/extconf.rb: revert. enbugged by last commit.
|
||||||
|
@ -103,16 +103,20 @@ w32_wait_events(HANDLE *events, int count, DWORD timeout, rb_thread_t *th)
|
|||||||
thread_debug(" w32_wait_events events:%p, count:%d, timeout:%ld, th:%p\n",
|
thread_debug(" w32_wait_events events:%p, count:%d, timeout:%ld, th:%p\n",
|
||||||
events, count, timeout, th);
|
events, count, timeout, th);
|
||||||
if (th && (intr = th->native_thread_data.interrupt_event)) {
|
if (th && (intr = th->native_thread_data.interrupt_event)) {
|
||||||
w32_reset_event(intr);
|
native_mutex_lock(&th->vm->global_vm_lock);
|
||||||
if (RUBY_VM_INTERRUPTED(th)) {
|
if (intr == th->native_thread_data.interrupt_event) {
|
||||||
w32_set_event(intr);
|
w32_reset_event(intr);
|
||||||
|
if (RUBY_VM_INTERRUPTED(th)) {
|
||||||
|
w32_set_event(intr);
|
||||||
|
}
|
||||||
|
|
||||||
|
targets = ALLOCA_N(HANDLE, count + 1);
|
||||||
|
memcpy(targets, events, sizeof(HANDLE) * count);
|
||||||
|
|
||||||
|
targets[count++] = intr;
|
||||||
|
thread_debug(" * handle: %p (count: %d, intr)\n", intr, count);
|
||||||
}
|
}
|
||||||
|
native_mutex_unlock(&th->vm->global_vm_lock);
|
||||||
targets = ALLOCA_N(HANDLE, count + 1);
|
|
||||||
memcpy(targets, events, sizeof(HANDLE) * count);
|
|
||||||
|
|
||||||
targets[count++] = intr;
|
|
||||||
thread_debug(" * handle: %p (count: %d, intr)\n", intr, count);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
thread_debug(" WaitForMultipleObjects start (count: %d)\n", count);
|
thread_debug(" WaitForMultipleObjects start (count: %d)\n", count);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user