1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* thread_win32.c (native_thread_destroy): decreased the probability of

using the interrupt event in the thread termination.
  see [ruby-core:27199].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2009-12-30 18:30:36 +00:00
parent 5bc85d6264
commit 9f90682c4b
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,9 @@
Thu Dec 31 03:27:53 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* thread_win32.c (native_thread_destroy): decreased the probability of
using the interrupt event in the thread termination.
see [ruby-core:27199].
Thu Dec 31 02:35:57 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* thread_win32.c (w32_error): should report the function.

View file

@ -449,10 +449,9 @@ native_thread_init_stack(rb_thread_t *th)
static void
native_thread_destroy(rb_thread_t *th)
{
HANDLE intr = th->native_thread_data.interrupt_event;
HANDLE intr = InterlockedExchangePointer(&th->native_thread_data.interrupt_event, 0);
native_mutex_destroy(&th->interrupt_lock);
thread_debug("close handle - intr: %p, thid: %p\n", intr, th->thread_id);
th->native_thread_data.interrupt_event = 0;
w32_close_handle(intr);
}