[前][次][番号順一覧][スレッド一覧]

ruby-changes:14377

From: usa <ko1@a...>
Date: Thu, 31 Dec 2009 03:31:18 +0900 (JST)
Subject: [ruby-changes:14377] Ruby:r26207 (trunk): * thread_win32.c (native_thread_destroy): decreased the probability of

usa	2009-12-31 03:30:36 +0900 (Thu, 31 Dec 2009)

  New Revision: 26207

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26207

  Log:
    * thread_win32.c (native_thread_destroy): decreased the probability of
      using the interrupt event in the thread termination.
      see [ruby-core:27199].

  Modified files:
    trunk/ChangeLog
    trunk/thread_win32.c

Index: thread_win32.c
===================================================================
--- thread_win32.c	(revision 26206)
+++ thread_win32.c	(revision 26207)
@@ -449,10 +449,9 @@
 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);
 }
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 26206)
+++ ChangeLog	(revision 26207)
@@ -1,3 +1,9 @@
+Thu Dec 31 03:27:53 2009  NAKAMURA Usaku  <usa@r...>
+
+	* 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@r...>
 
 	* thread_win32.c (w32_error): should report the function.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]