mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
threadpool: Use while loop on virCondWait
instead of simple 'if' statement as virCondWait can return even if associated condition was not signaled.
This commit is contained in:
parent
6c811ed486
commit
a7adac3730
@ -258,7 +258,7 @@ void virThreadPoolFree(virThreadPoolPtr pool)
|
||||
virCondBroadcast(&pool->prioCond);
|
||||
}
|
||||
|
||||
if (pool->nWorkers > 0 || pool->nPrioWorkers > 0)
|
||||
while (pool->nWorkers > 0 || pool->nPrioWorkers > 0)
|
||||
ignore_value(virCondWait(&pool->quit_cond, &pool->mutex));
|
||||
|
||||
while ((job = pool->jobList.head)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user