diff options
author | bunnei <bunneidev@gmail.com> | 2021-12-06 08:42:58 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-12-07 01:39:18 +0100 |
commit | d7f6d516cefed79dea14465abd7c2a0f036f78b9 (patch) | |
tree | 786e9bfb73b0c17aa4f0e93cc5ea07f1619a5705 /src | |
parent | hle: kernel: k_light_lock: Implement CancelWait. (diff) | |
download | yuzu-d7f6d516cefed79dea14465abd7c2a0f036f78b9.tar yuzu-d7f6d516cefed79dea14465abd7c2a0f036f78b9.tar.gz yuzu-d7f6d516cefed79dea14465abd7c2a0f036f78b9.tar.bz2 yuzu-d7f6d516cefed79dea14465abd7c2a0f036f78b9.tar.lz yuzu-d7f6d516cefed79dea14465abd7c2a0f036f78b9.tar.xz yuzu-d7f6d516cefed79dea14465abd7c2a0f036f78b9.tar.zst yuzu-d7f6d516cefed79dea14465abd7c2a0f036f78b9.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/kernel/service_thread.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/hle/kernel/service_thread.cpp b/src/core/hle/kernel/service_thread.cpp index 00657bc4c..03f3dec10 100644 --- a/src/core/hle/kernel/service_thread.cpp +++ b/src/core/hle/kernel/service_thread.cpp @@ -97,7 +97,13 @@ void ServiceThread::Impl::QueueSyncRequest(KSession& session, condition.notify_one(); } -ServiceThread::Impl::~Impl() = default; +ServiceThread::Impl::~Impl() { + condition.notify_all(); + for (auto& thread : threads) { + thread.request_stop(); + thread.join(); + } +} ServiceThread::ServiceThread(KernelCore& kernel, std::size_t num_threads, const std::string& name) : impl{std::make_unique<Impl>(kernel, num_threads, name)} {} |