[threadpool] Fix hang on threadpool cleanup (#4330)
[mono.git] / mono / metadata / threadpool-worker-default.c
index e882574ab15b10b5dbf188256f7e6c015094c421..6c499ebac9b2f9bead737848bf52ded8420036b6 100644 (file)
@@ -333,6 +333,7 @@ mono_threadpool_worker_cleanup (MonoThreadPoolWorker *worker)
        /* unpark all worker->parked_threads */
        mono_coop_cond_broadcast (&worker->parked_threads_cond);
 
+#if 0
        for (;;) {
                ThreadPoolWorkerCounter counter;
 
@@ -349,6 +350,7 @@ mono_threadpool_worker_cleanup (MonoThreadPoolWorker *worker)
 
                mono_coop_cond_wait (&worker->threads_exit_cond, &worker->threads_lock);
        }
+#endif
 
        mono_coop_mutex_unlock (&worker->threads_lock);