diff options
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; } |