mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-09 00:12:45 +01:00
hle: kernel: service_thread: Force stop threads on destruction.
This commit is contained in:
parent
e596fac6ee
commit
d7f6d516ce
1 changed files with 7 additions and 1 deletions
|
@ -97,7 +97,13 @@ void ServiceThread::Impl::QueueSyncRequest(KSession& session,
|
||||||
condition.notify_one();
|
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)
|
ServiceThread::ServiceThread(KernelCore& kernel, std::size_t num_threads, const std::string& name)
|
||||||
: impl{std::make_unique<Impl>(kernel, num_threads, name)} {}
|
: impl{std::make_unique<Impl>(kernel, num_threads, name)} {}
|
||||||
|
|
Loading…
Reference in a new issue