summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorMai M <mathew1800@gmail.com>2021-06-23 04:20:14 +0200
committerGitHub <noreply@github.com>2021-06-23 04:20:14 +0200
commitd6b51e5e2182eeda581135f4c282469885a9e984 (patch)
tree7bee9af13999732a0a9c1194707d39b6bc493156 /src/common
parentMerge pull request #6509 from ReinUsesLisp/mouse-datarace (diff)
parentcommon/detached_tasks: Wait for tasks before shutting down (diff)
downloadyuzu-d6b51e5e2182eeda581135f4c282469885a9e984.tar
yuzu-d6b51e5e2182eeda581135f4c282469885a9e984.tar.gz
yuzu-d6b51e5e2182eeda581135f4c282469885a9e984.tar.bz2
yuzu-d6b51e5e2182eeda581135f4c282469885a9e984.tar.lz
yuzu-d6b51e5e2182eeda581135f4c282469885a9e984.tar.xz
yuzu-d6b51e5e2182eeda581135f4c282469885a9e984.tar.zst
yuzu-d6b51e5e2182eeda581135f4c282469885a9e984.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/detached_tasks.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/detached_tasks.cpp b/src/common/detached_tasks.cpp
index f2b4939df..c1362631e 100644
--- a/src/common/detached_tasks.cpp
+++ b/src/common/detached_tasks.cpp
@@ -21,6 +21,8 @@ void DetachedTasks::WaitForAllTasks() {
}
DetachedTasks::~DetachedTasks() {
+ WaitForAllTasks();
+
std::unique_lock lock{mutex};
ASSERT(count == 0);
instance = nullptr;