Browse Source

更新部分注释

main
louyu 11 months ago
parent
commit
f4cddc2d13
1 changed files with 0 additions and 1 deletions
  1. 0
    1
      ThreadPool.h

+ 0
- 1
ThreadPool.h View File

@@ -254,7 +254,6 @@ private:
std::atomic<unsigned int> idleThreadSize_; // 记录空闲线程的数量
unsigned threadSizeThreshold_; // 线程数量上限阈值

// 这里队列里不能存裸指针,避免用户传入一个临时对象,使用智能指针延长外部传进来对象的生命周期
using Task = std::function<void()>;
std::queue<Task> taskQue_; // 任务队列
std::atomic<unsigned int> taskSize_; // 任务队列任务数,用原子变量保证原子性

Loading…
Cancel
Save