ruby-changes:3622
From: ko1@a...
Date: Fri, 18 Jan 2008 15:57:21 +0900 (JST)
Subject: [ruby-changes:3622] nobu - Ruby:r15111 (trunk): * thread.c (thread_cleanup_func): ignore errors from destroying mutex
nobu 2008-01-18 15:57:08 +0900 (Fri, 18 Jan 2008)
New Revision: 15111
Modified files:
trunk/ChangeLog
trunk/thread.c
trunk/thread_pthread.c
trunk/thread_win32.c
Log:
* thread.c (thread_cleanup_func): ignore errors from destroying mutex
of dead thread. [ruby-core:15069]
* thread_pthread.c, thread_win32.c (native_thread_destroy): ditto.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15111&r2=15110&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread_win32.c?r1=15111&r2=15110&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread.c?r1=15111&r2=15110&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread_pthread.c?r1=15111&r2=15110&diff_format=u
Index: thread_win32.c
===================================================================
--- thread_win32.c (revision 15110)
+++ thread_win32.c (revision 15111)
@@ -418,6 +418,7 @@
native_thread_destroy(rb_thread_t *th)
{
HANDLE intr = th->native_thread_data.interrupt_event;
+ 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 15110)
+++ ChangeLog (revision 15111)
@@ -1,3 +1,10 @@
+Fri Jan 18 15:57:05 2008 Nobuyoshi Nakada <nobu@r...>
+
+ * thread.c (thread_cleanup_func): ignore errors from destroying mutex
+ of dead thread. [ruby-core:15069]
+
+ * thread_pthread.c, thread_win32.c (native_thread_destroy): ditto.
+
Fri Jan 18 15:56:04 2008 Nobuyoshi Nakada <nobu@r...>
* encoding.c (rb_enc_name_list_i, rb_enc_aliases_enc_i): freeze
Index: thread_pthread.c
===================================================================
--- thread_pthread.c (revision 15110)
+++ thread_pthread.c (revision 15111)
@@ -13,7 +13,6 @@
static void native_mutex_lock(pthread_mutex_t *lock);
static void native_mutex_unlock(pthread_mutex_t *lock);
-static void native_mutex_destroy(pthread_mutex_t *lock);
static int native_mutex_trylock(pthread_mutex_t *lock);
static void native_mutex_initialize(pthread_mutex_t *lock);
static void native_mutex_destroy(pthread_mutex_t *lock);
@@ -156,6 +155,7 @@
static void
native_thread_destroy(rb_thread_t *th)
{
+ pthread_mutex_destroy(&th->interrupt_lock);
pthread_cond_destroy(&th->native_thread_data.sleep_cond);
}
Index: thread.c
===================================================================
--- thread.c (revision 15110)
+++ thread.c (revision 15111)
@@ -281,7 +281,6 @@
#ifdef __ia64
th->machine_register_stack_start = th->machine_register_stack_end = 0;
#endif
- native_mutex_destroy(&th->interrupt_lock);
native_thread_destroy(th);
}
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/