#include #include #include #include #include #include class TaskQueue { public: TaskQueue(); void initialize(); void notifyPool(); void pushToQueue(std::function fn); private: void handleLoop(); void tasksReady(); void done(); void detachThreads(); std::queue> m_task_queue; // ThreadPool m_thread_pool; std::vector m_thread_pool; std::thread m_loop_thread; std::mutex m_mutex_lock; std::condition_variable pool_condition; std::atomic accepting_tasks; };