mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
Merge pull request #6512 from ReinUsesLisp/wait-detached-stasks
common/detached_tasks: Wait for tasks before shutting down
This commit is contained in:
commit
d6b51e5e21
|
@ -21,6 +21,8 @@ void DetachedTasks::WaitForAllTasks() {
|
||||||
}
|
}
|
||||||
|
|
||||||
DetachedTasks::~DetachedTasks() {
|
DetachedTasks::~DetachedTasks() {
|
||||||
|
WaitForAllTasks();
|
||||||
|
|
||||||
std::unique_lock lock{mutex};
|
std::unique_lock lock{mutex};
|
||||||
ASSERT(count == 0);
|
ASSERT(count == 0);
|
||||||
instance = nullptr;
|
instance = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue