#ifndef THREADPOOL_BOOST_H #define THREADPOOL_BOOST_H #include #include #include #include class ThreadPool { public: explicit ThreadPool(size_t numThreads); ~ThreadPool(); void enqueue(std::function task); bool isStopping() const; void waitForCompletion(); private: boost::asio::io_service ioService; boost::asio::executor_work_guard workGuard; std::vector workers; }; #endif // THREADPOOL_BOOST_H