[*] Updated GetRPCProcessor to use a singleton from AuAsync

This commit is contained in:
Reece Wilson 2023-12-16 20:38:46 +00:00
parent bb3a872b07
commit a37a7f1023

View File

@ -9,13 +9,9 @@
#include "AuRPC.hpp" #include "AuRPC.hpp"
#include "AuRPCClientChannel.hpp" #include "AuRPCClientChannel.hpp"
static thread_local AuSPtr<AuIO::IIOProcessor> tlsIOProcessor;
AuSPtr<AuIO::IIOProcessor> GetRPCProcessor() AuSPtr<AuIO::IIOProcessor> GetRPCProcessor()
{ {
return tlsIOProcessor ? return AuAsync::IThreadPool::GetSelfIOProcessor();
tlsIOProcessor :
tlsIOProcessor = AuIO::NewIOProcessorOnThread(false, AuAsync::GetCurrentWorkerPId());
} }
bool AuRPC::StartClient(AuAsync::WorkerPId_t worker) bool AuRPC::StartClient(AuAsync::WorkerPId_t worker)