[sgen] Shutdown thread pool worker even if it's not active
authorVlad Brezae <brezaevlad@gmail.com>
Thu, 2 Mar 2017 14:28:25 +0000 (16:28 +0200)
committerVlad Brezae <brezaevlad@gmail.com>
Thu, 30 Mar 2017 11:13:24 +0000 (14:13 +0300)
mono/sgen/sgen-thread-pool.c

index 6f164d278c1b7d9b9a075c3de72506c0d2ba021a..f2aef3ae02363d6ccb3d107fce8f8a7f39d38cbb 100644 (file)
@@ -108,7 +108,7 @@ thread_func (void *thread_data)
                gboolean do_idle;
                SgenThreadPoolJob *job;
 
-               if (!should_work (thread_data)) {
+               if (!should_work (thread_data) && !threadpool_shutdown) {
                        mono_os_cond_wait (&work_cond, &lock);
                        continue;
                }