summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/kernel/service_thread.cpp8
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,
97 condition.notify_one(); 97 condition.notify_one();
98} 98}
99 99
100ServiceThread::Impl::~Impl() = default; 100ServiceThread::Impl::~Impl() {
101 condition.notify_all();
102 for (auto& thread : threads) {
103 thread.request_stop();
104 thread.join();
105 }
106}
101 107
102ServiceThread::ServiceThread(KernelCore& kernel, std::size_t num_threads, const std::string& name) 108ServiceThread::ServiceThread(KernelCore& kernel, std::size_t num_threads, const std::string& name)
103 : impl{std::make_unique<Impl>(kernel, num_threads, name)} {} 109 : impl{std::make_unique<Impl>(kernel, num_threads, name)} {}