C++ Concurrency in Action, Second Edition, Video Edition

Video description

"This book should be on every C++ programmer’s desk. It’s clear, concise, and valuable."
Rob Green, Bowling Green State University

This bestseller has been updated and revised to cover all the latest changes to C++ 14 and 17! C++ Concurrency in Action, Second Edition teaches you everything you need to write robust and elegant multithreaded applications in C++17.

You choose C++ when your applications need to run fast. Well-designed concurrency makes them go even faster. C++ 17 delivers strong support for the multithreaded, multiprocessor programming required for fast graphic processing, machine learning, and other performance-sensitive tasks. This exceptional book/course unpacks the features, patterns, and best practices of production-grade C++ concurrency.

C++ Concurrency in Action, Second Edition is the definitive guide to writing elegant multithreaded applications in C++. Updated for C++ 17, it carefully addresses every aspect of concurrent development, from starting new threads to designing fully functional multithreaded algorithms and data structures. Concurrency master Anthony Williams presents examples and practical tasks in every chapter, including insights that will delight even the most experienced developer.

Inside:
  • Full coverage of new C++ 17 features
  • Starting and managing threads
  • Synchronizing concurrent operations
  • Designing concurrent code
  • Debugging multithreaded applications
This book/course is written for intermediate C and C++ developers. No prior experience with concurrency required.

Anthony Williams has been an active member of the BSI C++ Panel since 2001 and is the developer of the just::thread Pro extensions to the C++ 11 thread library.

A thorough presentation of C++ concurrency capabilities.
Maurizio Tomasi, University of Milan

Highly recommended for programmers who want to further their knowledge of the latest C++ standard.
Frédéric Flayol, 4Pro Web C++

The guide contains snippets for everyday use in your own projects and to help take your concurrency C++ skills from the Padawan to the Jedi level.
Jura Shikin, IVI Technologies

NARRATED BY LISA FARINA AND DIANA GARDINER

Table of contents

  1. Ch 1. Hello, world of concurrency in C++!
    1. What is concurrency?
    2. Approaches to concurrency
    3. Why use concurrency?
    4. Concurrency and multithreading in C++
    5. Efficiency in the C++ Thread Library
    6. Getting started
  2. Ch 2. Managing threads
    1. Basic thread management
    2. Waiting for a thread to complete
    3. Passing arguments to a thread function
    4. Transferring ownership of a thread
    5. Choosing the number of threads at runtime
    6. Identifying threads
  3. Ch 3. Sharing data between threads
    1. Problems with sharing data between threads
    2. Protecting shared data with mutexes
    3. Spotting race conditions inherent in interfaces Part 1
    4. Spotting race conditions inherent in interfaces Part 2
    5. Deadlock: the problem and a solution
    6. Further guidelines for avoiding deadlock Part 1
    7. Further guidelines for avoiding deadlock Part 2
    8. Flexible locking with std::unique_lock
    9. Locking at an appropriate granularity
    10. Alternative facilities for protecting shared data
    11. Protecting rarely updated data structures
  4. Ch 4. Synchronizing concurrent operations
    1. Waiting for an event or other condition
    2. Building a thread-safe queue with condition variables
    3. Waiting for one-off events with futures
    4. Associating a task with a future
    5. Saving an exception for the future
    6. Waiting with a time limit
    7. Time points
    8. Using synchronization of operations to simplify code
    9. Synchronizing operations with message passing
    10. Continuation-style concurrency with the Concurrency TS
    11. Chaining continuations
    12. Waiting for the first future in a set with when_any
    13. std::experimental::barrier: a basic barrier
  5. Ch 5. The C++ memory model and operations on atomic types
    1. Memory model basics
    2. Atomic operations and types in C++
    3. Operations on std::atomic_flag
    4. Operations on std::atomic
      1. Operations on standard atomic integral types
      2. Free functions for atomic operations
      3. Synchronizing operations and enforcing ordering
      4. Memory ordering for atomic operations Part 1
      5. Memory ordering for atomic operations Part 2
      6. Memory ordering for atomic operations Part 3
      7. Memory ordering for atomic operations Part 4
      8. Release sequences and synchronizes-with
      9. Ordering non-atomic operations
    5. Ch 6. Designing lock-based concurrent data structures
      1. What does it mean to design for concurrency?
      2. Lock-based concurrent data structures
      3. A thread-safe queue using locks and condition variables
      4. A thread-safe queue using fine-grained locks and condition variables Part 1
      5. A thread-safe queue using fine-grained locks and condition variables Part 2
      6. A thread-safe queue using fine-grained locks and condition variables Part 3
      7. Designing more complex lock-based data structures
      8. Writing a thread-safe list using locks
    6. Ch 7. Designing lock-free concurrent data structures
      1. Definitions and consequences
      2. Wait-free data structures
      3. Examples of lock-free data structures
      4. Stopping those pesky leaks: managing memory in lock-free data structures
      5. Detecting nodes that can’t be reclaimed using hazard pointers Part 1
      6. Detecting nodes that can’t be reclaimed using hazard pointers Part 2
      7. Detecting nodes in use with reference counting
      8. Applying the memory model to the lock-free stack
      9. Writing a thread-safe queue without locks Part 1
      10. Writing a thread-safe queue without locks Part 2
      11. Writing a thread-safe queue without locks Part 3
      12. Guidelines for writing lock-free data structures
    7. Ch 8. Designing concurrent code
      1. Techniques for dividing work between threads
      2. Dividing data recursively
      3. Dividing work by task type
      4. Factors affecting the performance of concurrent code
      5. False sharing
      6. Designing data structures for multithreaded performance
      7. Additional considerations when designing for concurrency
      8. Scalability and Amdahl’s law
      9. Designing concurrent code in practice
      10. A parallel implementation of std::find
      11. A parallel implementation of std::partial_sum Part 1
      12. A parallel implementation of std::partial_sum Part 2
    8. Ch 9. Advanced thread management
      1. Thread pools
      2. Waiting for tasks submitted to a thread pool
      3. Tasks that wait for other tasks
      4. Work stealing
      5. Interrupting threads
      6. Interrupting a condition variable wait
      7. Handling interruptions
    9. Ch 10. Parallel algorithms
      1. Parallelizing the standard library algorithms
      2. std::execution::parallel_policy
      3. The parallel algorithms from the C++ Standard Library
      4. Examples of using parallel algorithms
    10. Ch 11. Testing and debugging multithreaded applications
      1. Types of concurrency-related bugs
      2. Techniques for locating concurrency-related bugs
      3. Locating concurrency-related bugs by testing
      4. Multithreaded testing techniques
      5. Structuring multithreaded test code

Product information

  • Title: C++ Concurrency in Action, Second Edition, Video Edition
  • Author(s): Anthony Williams
  • Release date: February 2019
  • Publisher(s): Manning Publications
  • ISBN: None