#pragma once #include #include #include #include #include namespace bumbleBee { template class ThreadPool { public: ThreadPool() = delete; ThreadPool(std::int32_t threadCount); std::thread::id execute(std::function function); void gracefullStop(std::thread::id thread); void gracefullAllStop(); private: std::mutex mutex_; std::condition_variable condition_; std::int32_t threadCount_; std::vector threadPool_; std::unordered_map terminating_; }; }