Allow threads to gracefully shutdown

This commit is contained in:
Luke Street
2026-04-01 18:30:12 -06:00
parent 7d57ff914b
commit 2e920d510d
16 changed files with 135 additions and 158 deletions
+9
View File
@@ -72,6 +72,15 @@ static PCCondData& GetCondData(OSCond* cond) {
return *it->second;
}
void ClearCondMap() {
std::lock_guard<std::mutex> lock(GetCondMapMutex());
auto& map = GetCondMap();
for (auto& pair : map) {
pair.second->cv.notify_all();
}
map.clear();
}
// ============================================================================
// C API functions
// ============================================================================