[sgen] Parallel nursery collections
[mono.git] / mono / sgen / sgen-thread-pool.c
index 20c5e17d3d7464fc90ac156b0efdaeb3d45b8b6a..f2aef3ae02363d6ccb3d107fce8f8a7f39d38cbb 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-thread-pool.c: Threadpool for all concurrent GC work.
+/**
+ * \file
+ * Threadpool for all concurrent GC work.
  *
  * Copyright (C) 2015 Xamarin Inc
  *
@@ -107,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;
                }