I explain what a mutex is and how to use it in modern C++. Also, I explain what a conditional variable in C++ is and how to use it.
I cover the following topics:
- Race condition
- Mutual exclusion in modern C++
- std::mutex
- lock() / unlock()
- lock_guard
- unique_lock
- shared_lock
- scoped_lock
- Sequential Consistency
- Deadlock
- Thread communication with Conditional Variables
I use modern C++11, C++14, and C++17 constructs.
This is my second video on C++ Multithreading.
- Link to Part 1: [ Ссылка ]
You can download and code with me using this link:
[ Ссылка ]
You can run the code either using Bazel or gcc/g++.
Check my other video on using Bazel to build C++ files in Visual Studio Code:
[ Ссылка ]
More details on Bazel:
[ Ссылка ]
------------------------------------------------------------------------------------------
Keep in touch with me:
[ Ссылка ]
I'm the founder of BitcoinCrazyness app, the Most Advanced Cryptocurrency APP, Check it out:
[ Ссылка ]
Ещё видео!