The Boost C++ Libraries

Chapter 44. Boost.Thread

Table of Contents

Boost.Thread is the library that allows you to use threads. Furthermore, it provides classes to synchronize access on data which is shared by multiple threads.

Threads have been supported by the standard library since C++11. You will also find classes in the standard library that threads can be created and synchronized with. While Boost.Thread resembles the standard library in many regards, it offers extensions. For example, you can interrupt threads created with Boost.Thread. You will also find special locks in Boost.Thread that will probably be added to the standard library with C++14. Thus, it can make sense to use Boost.Thread even if you work in a C++11 development environment.