官术网_书友最值得收藏!

Boost

Boost threads is a relatively small part of the Boost collection of libraries. It was, however, used as the basis for what became the multithreading implementation in C++11, similar to how other Boost libraries ultimately made it, fully or partially, into new C++ standards. Refer to the C++ threads section in this chapter for details on the multithreading API.

Features missing in the C++11 standard, which are available in Boost threads, include the following:

  • Thread groups (like Windows jobs)
  • Thread interruption (cancellation)
  • Thread join with timeout
  • Additional mutual exclusion lock types (improved with C++14)

Unless one absolutely needs such features, or if one cannot use a compiler which supports the C++11 standard (including STL threads), there is little reason to use Boost threads over the C++11 implementation.

Since Boost provides wrappers around native OS features, using native C++ threads would likely reduce overhead depending on the quality of the STL implementation.

主站蜘蛛池模板: 惠州市| 泸定县| 西乌珠穆沁旗| 洛浦县| 永仁县| 芦溪县| 朝阳市| 沛县| 乌鲁木齐市| 彭水| 泗阳县| 高陵县| 裕民县| 四子王旗| 闽侯县| 西青区| 顺昌县| 卓尼县| 集安市| 烟台市| 石棉县| 和林格尔县| 奇台县| 高唐县| 陕西省| 芷江| 明光市| 巴青县| 义马市| 齐齐哈尔市| 黄梅县| 天长市| 嘉义市| 乐昌市| 翁源县| 永泰县| 扎囊县| 萝北县| 和政县| 健康| 阿坝县|