Skip to Content
C++20 for Programmers: An Objects-Natural Approach, 3rd Edition
book

C++20 for Programmers: An Objects-Natural Approach, 3rd Edition

by Paul Deitel, Harvey Deitel
April 2022
Intermediate to advanced
1012 pages
38h 1m
English
Pearson
Content preview from C++20 for Programmers: An Objects-Natural Approach, 3rd Edition

17. Parallel Algorithms and Concurrency: A High-Level View

Objectives

In this chapter, you’ll:

  • Understand concurrency, parallelism and multithreading.

  • Use high-level concurrency features such as C++17 parallel algorithms and C++20 latches and barriers.

  • Understand the thread life cycle.

  • Use the <chrono> header’s timing features to profile sequential and parallel algorithm performance on multi-core systems.

  • Implement correct producer–consumer relationships.

  • Synchronize access to shared mutable data by multiple threads using std::mutex, std::lock_guard, std::condition_variable and std::unique_lock.

  • Use std::async and std::future to execute long calculations asynchronously and get their results.

  • Use C++20 concurrency features, including latches, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Designing Data-Intensive Applications, 2nd Edition

Designing Data-Intensive Applications, 2nd Edition

Martin Kleppmann, Chris Riccomini

Publisher Resources

ISBN: 9780136905776