#ifndef curl_thread_pool_p_H #define curl_thread_pool_p_H #include "piconditionvar.h" #include "piprotectedvariable.h" #include "pisemaphore.h" #include "pithread.h" class PIHTTPClient; class CurlThreadPool { public: void registerClient(PIHTTPClient * c); static CurlThreadPool * instance(); private: NO_COPY_CLASS(CurlThreadPool) CurlThreadPool(); ~CurlThreadPool(); void threadFunc(); void procClient(PIHTTPClient * c); PIProtectedVariable> clients; PISemaphore sem; PIVector threads; std::atomic_bool exiting = {false}; }; #endif