Audit our use of condition variables, fix some minor issues

This commit is contained in:
Henrik Rydgård committed 2024-01-29 11:09:08 +01:00
1 parent a93b55c215
commit ee62ffdb02
4 files changed
+32 -27

No files matched your search

+1 -1
View File
@@ -59,8 +59,8 @@ ThreadManager::~ThreadManager() {
void ThreadManager::Teardown() {
for (TaskThreadContext *&threadCtx : global_->threads_) {
threadCtx->cancelled = true;
std::unique_lock<std::mutex> lock(threadCtx->mutex);
threadCtx->cancelled = true;
threadCtx->cond.notify_one();
}