AuroraRuntime/Source/IO/Net/AuNetSrvWorkers.hpp
Jamie Reece Wilson ca2c0462ab [*] Continue to refactor allocations of synchronization primitive away
[*] NT: Fix missing CoTaskMemFree leak on startup
[*] Fix ConsoleStd restart bug
2023-06-28 10:33:12 +01:00

30 lines
768 B
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuNetSrvWorkers.cpp
Date: 2022-8-16
Author: Reece
***/
#pragma once
namespace Aurora::IO::Net
{
struct NetWorker;
struct NetSrvWorkers : INetSrvWorkers
{
NetSrvWorkers();
AuSPtr<INetWorker> Attach(const AuSPtr<IIOProcessor> &processor) override;
void Destroy() override;
void RemoveCache(NetWorker *worker);
AuSPtr<NetWorker> GetWorkerByIndex(AuUInt index);
AuSPtr<INetWorker> GetWorkerByIndexSafe(AuUInt index) override;
private:
AuList<AuSPtr<NetWorker>> workerPool_;
AuThreadPrimitives::Mutex mutex_;
};
}