diff --git a/util/thread-pool.c b/util/thread-pool.c index 8f8cb38d5c..4e75191c98 100644 --- a/util/thread-pool.c +++ b/util/thread-pool.c @@ -493,5 +493,5 @@ bool thread_pool_adjust_max_threads_to_work(ThreadPool *pool) { QEMU_LOCK_GUARD(&pool->cur_work_lock); - return thread_pool_set_max_threads(pool, pool->cur_work); + return thread_pool_set_max_threads(pool, MAX(pool->cur_work, 1)); }