Summary

In this chapter, we looked at how to write concurrent logic in terms of threads and tasks using the Boost Thread library and the C++11 Standard Library. We learned how to use the futures and promises paradigm to define ordering of operations across concurrent tasks, and some abstractions around futures and promises in the Standard Library. We also studied various lock-based thread synchronization primitives and applied them to some common multithreading problems.

Multithreading is a difficult and complex topic, and this chapter merely introduces the portable APIs available in Boost to write concurrent programs. The Boost Thread library and the concurrent programming interfaces in the C++ Standard Library are an evolving set, and we did ...

Get Learning Boost C++ Libraries now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.