首页 > TAG信息列表 > NewTask

C++实现简单的线程池

// thread_pool.h #pragma once #include <vector> #include <deque> #include <thread> #include <functional> #include <condition_variable> class ThreadPool { using Task = std::function<void()>; using TaskList = std