Lines Matching defs:ThreadPool
26 template <typename Task, const size_t DEFAULT_THREAD_NUM, const size_t MAX_THREAD_NUM> class ThreadPool {
31 ThreadPool() = delete;
36 ThreadPool(const ThreadPool &) = delete;
41 ThreadPool &operator=(const ThreadPool &) = delete;
46 ThreadPool(ThreadPool &&) = delete;
51 ThreadPool &operator=(ThreadPool &&) = delete;
57 explicit ThreadPool(uint32_t timeout) : timeout_(timeout), idleThreadNum_(0), needRun_(true)
65 * if ~ThreadPool, terminate all thread
67 ~ThreadPool()
203 * when ThreadPool object is deleted, wait until runningNum_ is zero.
207 * when ThreadPool object is deleted, set needRun_ to false, mean that all thread should be terminated