Add Readme

master
Kirigaya Kazuto 2017-11-09 14:50:30 +08:00
parent ee7ecd8d63
commit 00a07d006b
1 changed files with 23 additions and 0 deletions

23
Readme.md Normal file
View File

@ -0,0 +1,23 @@
# ThreadPool
使用现代C++写的线程池.
## `class ThreadPool` 线程池类
不可复制,不可移动
构造时需指定最大线程数,构造后不可更改
析构时等待所有线程工作结束.
API参考:
`int start(const std::function<void()>&)` 发送一个任务到线程池
返回值:
-1 无法启动任务,线程池已满
-2 线程池内部错误
\>=0 任务启动成功,返回工作线程序号.