Concurrency

Race Conditions and Basic Protection with a Mutex

Learn about C++ race conditions and how to prevent them when updating shared data. Use std::mutex and the RAII-style std::lock_guard for thread safety.

Your First Concurrent C++ Program - Parallel Sum with std::thread

Build a parallel sum function using std::thread and analyze performance. Discover the thread overhead and the optimal number of threads for massive speedup.