ThreadPool_Cpp:ThreadPool:C ++ 17仅标头std :: future 源码
线程池 C ++中的线程池 主要特点 C ++ 17 仅标题 std :: future 仅使用一个互斥锁即可添加多个任务 如何使用 添加任务 int Function1 ( int & num); int Function2 ( int num); void Function3 (); { // I recommend declare ThreadPool inside of scope for resource hadling ThreadPool< 5> threadPool; // Pass With Thread Pool Size(Worker Count) int a = 5 ; // Push Tasks std::future< int> future1 = threadPool. AddTask (Function1, std::ref (a));
文件列表
ThreadPool_Cpp-master.zip
(预估有个7文件)
ThreadPool_Cpp-master
.gitmodules
113B
concurrentqueue
ThreadPool.h
10KB
LICENSE
1KB
Examples
example.cpp
2KB
example2.cpp
2KB
.gitignore
6KB
README.md
3KB
暂无评论