* thread_pthread.c (native_stop_timer_thread): need to join timer thread

only when really stopping it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2009-11-02 04:32:28 +00:00
Родитель 9ee5e613b5
Коммит 12fadc1022
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,8 @@
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
only when really stopping it.
Mon Nov 2 12:55:50 2009 NAKAMURA Usaku <usa@ruby-lang.org> Mon Nov 2 12:55:50 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* thread_{pthread,win32}.c (native_stop_timer_thread): join the thread * thread_{pthread,win32}.c (native_stop_timer_thread): join the thread

Просмотреть файл

@ -814,9 +814,9 @@ native_stop_timer_thread(void)
stopped = --system_working <= 0; stopped = --system_working <= 0;
if (stopped) { if (stopped) {
native_cond_signal(&timer_thread_cond); native_cond_signal(&timer_thread_cond);
native_thread_join(timer_thread_id);
} }
native_mutex_unlock(&timer_thread_lock); native_mutex_unlock(&timer_thread_lock);
native_thread_join(timer_thread_id);
return stopped; return stopped;
} }