move TIoPollThread out and use it in TServer

the previous IoCtx was never being polled
This commit is contained in:
Lion Kortlepel
2026-04-09 18:49:10 +02:00
parent be0d8d5334
commit c08eefdf69
6 changed files with 105 additions and 68 deletions
+3 -3
View File
@@ -20,6 +20,7 @@
#include "IThreaded.h"
#include "RWMutex.h"
#include "TIoPollThread.h"
#include "TScopedTimer.h"
#include <functional>
#include <memory>
@@ -50,11 +51,10 @@ public:
const TScopedTimer UptimeTimer;
// asio io context
io_context& IoCtx() { return mIoCtx; }
io_context& IoCtx() { return mIoCtxPoller.IoCtx(); }
private:
io_context mIoCtx {};
TIoPollThread mIoCtxPoller;
TClientSet mClients;
mutable RWMutex mClientsMutex;
static void ParseVehicle(TClient& c, const std::string& Pckt, TNetwork& Network);