diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-02 05:45:35 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-02 05:45:35 +0000 |
commit | 409033efcac2d6d81b228b12e335bc75f7ae16a1 (patch) | |
tree | 0313fa9d1792c747ccf95a77f0b1ff1da292d265 /thread_pthread.c | |
parent | 12fadc102208853bd291d063204fdc2a1fcc0c40 (diff) | |
download | ruby-409033efcac2d6d81b228b12e335bc75f7ae16a1.tar.gz |
* thread_pthread.c (native_stop_timer_thread): delay joinning timer
thread after unlocking mutex.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index e82777d68e..2273d2062c 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; } |