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

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.

主站蜘蛛池模板: 大新县| 安平县| 白沙| 商丘市| 达尔| 绥中县| 德化县| 汝城县| 慈利县| 吴川市| 崇义县| 蓝山县| 吉首市| 宝应县| 凤山县| 马山县| 盐亭县| 涪陵区| 耒阳市| 凤阳县| 和林格尔县| 桐城市| 黄浦区| 麟游县| 德州市| 和田市| 新郑市| 新疆| 萍乡市| 丽水市| 博客| 台东县| 红安县| 五寨县| 平昌县| 桦川县| 浦北县| 广西| 永福县| 大石桥市| 洛扎县|