Learn Multithreading with Modern C++
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
Requirements
- Familiarity with Advanced Modern C++ features such as lambda expressions and move semantics
- Access to C++11 compiler (C++14 preferred.) Parallel algorithms require C++17
- Intended for students who have taken my courses "Learn Advanced Modern C++" or "Update to Modern C++"
- Proficiency in English (B2 level, preferably C1)
Description
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.
The course begins by reviewing the newer features of C++ which are used in this course. If you want more thorough coverage, you can get this by taking my course "Learn Advanced Modern C++".
We then cover 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.
Who this course is for:
- Programmers with a good knowledge of C++ but little or no exposure to multithreading
Instructor
I have been a software developer since 1994, mainly in telecomms and finance, both in the UK and abroad. I now work as an instructor and have taught software development classes in a range of environments.
I have so far published five courses on Udemy.
"Begin Programming with Modern C++" and "Learn Advanced Modern C++" comprehensively cover C++11 and 14 and some C++17.
"Update to Modern C++" comprehensively covers all the changes between older versions and C++11/14. It is meant for more experienced C++ programmers.
"Learn Modern C++ Multithreading" teaches the principles of multithreaded programming using C++11, 14 and some C++17. This course is also available as an e-book.
"Update to C++17" covers all the changes between C++14 and 17.