mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* thread_win32.ci (w32_wait_events): check whether interrupt_event is
valid handle or not. * thread_win32.ci (native_thread_destroy): clear interrupt_event when close it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f024801e1e
commit
00f60d0748
2 changed files with 14 additions and 5 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Tue Apr 10 16:14:22 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* thread_win32.ci (w32_wait_events): check whether interrupt_event is
|
||||||
|
valid handle or not.
|
||||||
|
|
||||||
|
* thread_win32.ci (native_thread_destroy): clear interrupt_event when
|
||||||
|
close it.
|
||||||
|
|
||||||
Tue Apr 10 15:53:17 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
Tue Apr 10 15:53:17 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* thread_pthread.ci (native_thread_create): initialize sleep_cond.
|
* thread_pthread.ci (native_thread_create): initialize sleep_cond.
|
||||||
|
|
|
@ -70,12 +70,12 @@ static int
|
||||||
w32_wait_events(HANDLE *events, int count, DWORD timeout, rb_thread_t *th)
|
w32_wait_events(HANDLE *events, int count, DWORD timeout, rb_thread_t *th)
|
||||||
{
|
{
|
||||||
HANDLE *targets = events;
|
HANDLE *targets = events;
|
||||||
|
HANDLE intr;
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
|
|
||||||
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) {
|
if (th && (intr = th->native_thread_data.interrupt_event)) {
|
||||||
HANDLE intr = th->native_thread_data.interrupt_event;
|
|
||||||
w32_reset_event(intr);
|
w32_reset_event(intr);
|
||||||
if (th->interrupt_flag) {
|
if (th->interrupt_flag) {
|
||||||
w32_set_event(intr);
|
w32_set_event(intr);
|
||||||
|
@ -286,9 +286,10 @@ NOINLINE(static int
|
||||||
static void
|
static void
|
||||||
native_thread_destroy(rb_thread_t *th)
|
native_thread_destroy(rb_thread_t *th)
|
||||||
{
|
{
|
||||||
thread_debug("close handle - intr: %p, thid: %p\n",
|
HANDLE intr = th->native_thread_data.interrupt_event;
|
||||||
th->native_thread_data.interrupt_event, th->thread_id);
|
thread_debug("close handle - intr: %p, thid: %p\n", intr, th->thread_id);
|
||||||
w32_close_handle(th->native_thread_data.interrupt_event);
|
th->native_thread_data.interrupt_event = 0;
|
||||||
|
w32_close_handle(intr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int _stdcall
|
static unsigned int _stdcall
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue