watcher = TRUE;
}
-
if (goto_global_pool)
{
- pool->num_threads--;
+ pool->num_threads--;
if (!pool->running && !pool->waiting)
{
g_async_queue_unlock (pool->queue);
g_thread_pool_free_internal (pool);
}
- else if (len == - pool->num_threads)
+ else
{
- g_thread_pool_wakeup_and_stop_all (pool);
+ if (len == - pool->num_threads)
+ g_thread_pool_wakeup_and_stop_all (pool);
+
g_async_queue_unlock (pool->queue);
}
}