|
|
@ -22,7 +22,7 @@ namespace Kernel {
|
|
|
|
|
|
|
|
|
|
|
|
class ServiceThread::Impl final {
|
|
|
|
class ServiceThread::Impl final {
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
explicit Impl(KernelCore& kernel);
|
|
|
|
explicit Impl(KernelCore& kernel, std::size_t num_threads);
|
|
|
|
~Impl();
|
|
|
|
~Impl();
|
|
|
|
|
|
|
|
|
|
|
|
void QueueSyncRequest(ServerSession& session, std::shared_ptr<HLERequestContext>&& context);
|
|
|
|
void QueueSyncRequest(ServerSession& session, std::shared_ptr<HLERequestContext>&& context);
|
|
|
@ -35,9 +35,8 @@ private:
|
|
|
|
bool stop{};
|
|
|
|
bool stop{};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
ServiceThread::Impl::Impl(KernelCore& kernel) {
|
|
|
|
ServiceThread::Impl::Impl(KernelCore& kernel, std::size_t num_threads) {
|
|
|
|
constexpr std::size_t SizeOfPool{1};
|
|
|
|
for (std::size_t i = 0; i < num_threads; ++i)
|
|
|
|
for (std::size_t i = 0; i < SizeOfPool; ++i)
|
|
|
|
|
|
|
|
threads.emplace_back([&] {
|
|
|
|
threads.emplace_back([&] {
|
|
|
|
// Wait for first request before trying to acquire a render context
|
|
|
|
// 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;
|
|
|
|
ServiceThread::~ServiceThread() = default;
|
|
|
|
|
|
|
|
|
|
|
|