C++ standard library functions for multi-threading
- Threads: https://en.cppreference.com/w/cpp/thread/thread
- Mutual Exclusion: https://en.cppreference.com/w/cpp/thread#Mutual_exclusion
- RAII style mutex management: https://en.cppreference.com/w/cpp/thread#Generic_mutex_management
Please refer to the code examples which also include comments for better understanding: