work_queue_fill is an unsigned so we can simplify the condition variable predicate.

Co-authored-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Gianluca Martino 2025-02-25 12:54:59 +01:00 committed by GitHub
parent 9afaf6f136
commit 25104ca2a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ extern "C" void vcd_work_sync(void)
if (work_queue_fill > 0) {
std::unique_lock<std::mutex> lock(work_queue_mutex);
work_queue_is_empty_sig.wait(lock, []{ return !(work_queue_fill > 0); });
work_queue_is_empty_sig.wait(lock, []{ return work_queue_fill == 0; });
}
}