Course Information
Course Overview
Learn how to write threaded C++ code which can unleash the full power of modern multi-processor hardware!
Multithreading is used in many areas of computing, including graphics processing, machine learning and Internet stores. An understanding of threads is essential to make full use of the capabilities of modern hardware.
C++ now provides direct support for threads, making it possible to write portable multithreaded programs which have well-defined behaviour, without requiring any external libraries.
This course thoroughly covers the basics of threading and will prepare you for more advanced work with threads. Source code is provided for all the examples. No previous knowledge of threading is required, but you should be comfortable with programming in C++ at an intermediate level, using "Modern" features such as smart pointers and move semantics.
We start with the concepts of multithreading and learn how to launch threads in C++. We look at the problems which can occur with multiple threads and how to avoid them.
C++ provides tools which allow us to work at a higher level of abstraction than system threads which share data; we cover condition variables and promises with futures. We will also look at asynchronous, lock-free and parallel programming, including atomic variables and the parallel algorithms in C++17. We will finish the course by implementing a concurrent queue and thread pool, which will bring together the material you have learnt.
There are downloadable exercises for each video, with solutions, so you can check your understanding as you learn, gaining familiarity and confidence with the material. There are also some optional assignments, which are more challenging.
I will be actively supporting the course. I will respond promptly if you have any questions or experience difficulties with the course content. Please feel free to use the Q&A feature or alternatively you can send me a private message.
Course Content
- 10 section(s)
- 91 lecture(s)
- Section 1 Introduction
- Section 2 Review of Modern C++ Features
- Section 3 Introduction to Concurrency
- Section 4 Getting Started with Threads
- Section 5 Working with shared data
- Section 6 Thread Synchronization
- Section 7 Atomic Types
- Section 8 Asynchronous Programming
- Section 9 Parallelism
- Section 10 Practical Data Structures for Concurrent Programming
What You’ll Learn
- How to write portable multi-threaded code in C++
- Basic principles of multi-threading which will be applicable in all languages
- Understanding of concurrency
- Knowledge of C++17 parallel algorithms
Skills covered in this course
Reviews
-
RReginaldo da Silva Souza
Nowadays with multicore processors available in practically any device, enabling true parallel execution, multithreading is fundamental for performant scalable applications. This course covered all the bases of Modern C++17 parallel, multithreading features.
-
OOlga Soika
I enjoyed the course!
-
BBian Li
The course content is generally quite good except that the codes in the last couple of lectures are non-robust because they overlooked some corner cases. Moreover, I wish we cover much more in the lock-free programming with CAS.
-
NNatalia del Valle Navarro
If you already know the basics of threads and are good at being self-taught and navigating StackOverflow/Cppreference this course doesn't offer much practical value. It has a lot of really good theory though