mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 10:08:04 -05:00
common/detached_tasks: Wait for tasks before shutting down
If this is not waited on, the synchronization primitives are destroyed whe main exits and the detached task ends up signalling garbage and not properly finishing.
This commit is contained in:
@ -21,6 +21,8 @@ void DetachedTasks::WaitForAllTasks() {
|
||||
}
|
||||
|
||||
DetachedTasks::~DetachedTasks() {
|
||||
WaitForAllTasks();
|
||||
|
||||
std::unique_lock lock{mutex};
|
||||
ASSERT(count == 0);
|
||||
instance = nullptr;
|
||||
|
Reference in New Issue
Block a user