在C ++中的简单线程池 [英] Simple thread pool in C++

查看:173
本文介绍了在C ++中的简单线程池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以指示我使用C ++的线程池的示例实现吗?我正在寻找一个非常基本的,没有太多复杂性,这将是适合初学者在线程学习。

Could anyone point me to a sample implementation of a thread pool in C++, please? I'm looking for a very basic one without too much complexity, which would be suitable for a beginner in threading to study.

推荐答案

查看英特尔的线程构建块。我不知道图书馆符合你简单的标准,但它似乎是非常周到和彻底的。我认为如果你想在C ++中进行线程化,那么值得努力学习。

Look at Intel's Thread Building Blocks. I don't know how well that library meets your "simple" criteria, but it seems to be very well thought-out and thorough. I would think that it would be worth the effort to learn if you want to do threading in C++.

Boost 也有一些线程设置。

这篇关于在C ++中的简单线程池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆