ThreadPool:使用std的C ++线程池

时间:2021-04-29 20:13:26
【文件属性】:
文件名称:ThreadPool:使用std的C ++线程池
文件大小:9KB
文件格式:ZIP
更新时间:2021-04-29 20:13:26
C++ 线程池 使用std :: thread和其他C ++ 11/14标准线程实用程序的C ++线程池。 易于使用,具有一些额外功能,可以进行更多控制。 auto add(Func&& func, Args&&... args) 这是将作业添加到ThreadPool 。 接受要排队的可调用对象( func )以及参数( args... )。 返回模板Func的返回类型的std::future ,以获取返回值。 完整签名: template < typename> auto add (Func&& func, Args&&... args) -> std::future::type>; std::size_t threadCount() const 返回名称所隐
【文件预览】:
ThreadPool-master
----ThreadPool.cpp(3KB)
----ThreadPool.vcxproj.filters(1KB)
----example.cpp(2KB)
----ThreadPool.hpp(3KB)
----LICENSE(1KB)
----README.md(2KB)
----.gitignore(5KB)
----ThreadPool.vcxproj(7KB)

网友评论