Best Practices
This chapter provides you with a simple set of rules for writing well-defined and fast, concurrent programs in modern C++. Multithreading, and in particular parallelism and concurrency, is quite a new topic in C++; therefore, more and more best practices are discovered in the coming years. Consider the rules in this chapter not as a complete list; but rather as a necessary starting point that evolves over time. This holds particularly true for the parallel STL. At the time of updating this book (12/2018), the parallel algorithms of C++17 are only partially available; therefore, it is too early to formulate best practices for it.