diff options
Diffstat (limited to 'src/core/hle/kernel/service_thread.cpp')
-rw-r--r-- | src/core/hle/kernel/service_thread.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/service_thread.cpp b/src/core/hle/kernel/service_thread.cpp index 59a6045df..4ceb7e56a 100644 --- a/src/core/hle/kernel/service_thread.cpp +++ b/src/core/hle/kernel/service_thread.cpp @@ -22,7 +22,7 @@ namespace Kernel { class ServiceThread::Impl final { public: - explicit Impl(KernelCore& kernel); + explicit Impl(KernelCore& kernel, std::size_t num_threads); ~Impl(); void QueueSyncRequest(ServerSession& session, std::shared_ptr<HLERequestContext>&& context); @@ -35,9 +35,8 @@ private: bool stop{}; }; -ServiceThread::Impl::Impl(KernelCore& kernel) { - constexpr std::size_t SizeOfPool{1}; - for (std::size_t i = 0; i < SizeOfPool; ++i) +ServiceThread::Impl::Impl(KernelCore& kernel, std::size_t num_threads) { + for (std::size_t i = 0; i < num_threads; ++i) threads.emplace_back([&] { // Wait for first request before trying to acquire a render context { @@ -88,7 +87,8 @@ ServiceThread::Impl::~Impl() { } } -ServiceThread::ServiceThread(KernelCore& kernel) : impl{std::make_unique<Impl>(kernel)} {} +ServiceThread::ServiceThread(KernelCore& kernel, std::size_t num_threads) + : impl{std::make_unique<Impl>(kernel, num_threads)} {} ServiceThread::~ServiceThread() = default; |