From 470bf21c436615a4ba4597e4da98f29d2057618b Mon Sep 17 00:00:00 2001 From: malloc Date: Wed, 11 Apr 2018 16:28:00 -0500 Subject: [PATCH] flat pool --- server/src/sock/pool.hpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/server/src/sock/pool.hpp b/server/src/sock/pool.hpp index c7c7385..d149bb1 100644 --- a/server/src/sock/pool.hpp +++ b/server/src/sock/pool.hpp @@ -1,6 +1,11 @@ #ifndef SOSC_POOL_H #define SOSC_POOL_H +#include +#include +#include +#include + namespace sosc { template class Pool { @@ -9,7 +14,21 @@ public: protected: virtual void ProcessClient(T* client) = 0; private: + class Stack { + public: + + private: + std::thread thread; + std::list clients; + std::mutex clients_mtx; + Pool *pool; + + friend class Pool; + }; + std::vector stacks; + + friend class Stack; }; }