mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-12 21:45:19 -04:00
Allow threads to gracefully shutdown
This commit is contained in:
@@ -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
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user