#pragma once #include #include namespace rtc { class Thread; template class scoped_refptr; } namespace webrtc { class SharedModuleThread; } namespace tgcalls { class Threads { public: virtual ~Threads() = default; virtual rtc::Thread *getNetworkThread() = 0; virtual rtc::Thread *getMediaThread() = 0; virtual rtc::Thread *getWorkerThread() = 0; virtual rtc::scoped_refptr getSharedModuleThread() = 0; // it is not possible to decrease pool size static void setPoolSize(size_t size); static std::shared_ptr getThreads(); }; namespace StaticThreads { rtc::Thread *getNetworkThread(); rtc::Thread *getMediaThread(); rtc::Thread *getWorkerThread(); rtc::scoped_refptr getSharedMoudleThread(); std::shared_ptr &getThreads(); } };