#pragma once #include #include #include #include #include #include namespace mbgl { class ThreadPool final : public Scheduler { public: explicit ThreadPool(std::size_t count); ~ThreadPool() override; void schedule(std::weak_ptr) override; private: std::vector threads; std::queue> queue; std::mutex mutex; std::condition_variable cv; bool terminate{ false }; }; } // namespace mbgl