summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-02 05:45:35 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-02 05:45:35 +0000
commit1592a4d1ef044f3eae12b7df3f53903143718cea (patch)
tree0313fa9d1792c747ccf95a77f0b1ff1da292d265
parentf295f29160bd6d43e91c95406f30e46cf280ee26 (diff)
downloadruby-1592a4d1ef044f3eae12b7df3f53903143718cea.tar.gz
ruby-1592a4d1ef044f3eae12b7df3f53903143718cea.tar.xz
ruby-1592a4d1ef044f3eae12b7df3f53903143718cea.zip
* thread_pthread.c (native_stop_timer_thread): delay joinning timer
thread after unlocking mutex. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--thread_pthread.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d11727939..bb05a7ae8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Nov 2 14:43:48 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * thread_pthread.c (native_stop_timer_thread): delay joinning timer
+ thread after unlocking mutex.
+
Mon Nov 2 13:31:14 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* thread_pthread.c (native_stop_timer_thread): need to join timer thread
diff --git a/thread_pthread.c b/thread_pthread.c
index e82777d68..2273d2062 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -814,9 +814,11 @@ native_stop_timer_thread(void)
stopped = --system_working <= 0;
if (stopped) {
native_cond_signal(&timer_thread_cond);
- native_thread_join(timer_thread_id);
}
native_mutex_unlock(&timer_thread_lock);
+ if (stopped) {
+ native_thread_join(timer_thread_id);
+ }
return stopped;
}