Tag: Multithreading
5 posts
-
C++ Technical Interview
C++ technical interviews expect you to explain pointers, RAII, virtual functions, STL, and concurrency verbally.
-
C++ Data Races: When to Use Atomics Instead of Mutexes
C++ data races explained: mutex vs std::atomic, memory orders, deadlock avoidance, and compare-exchange—with examples.
-
C++ Lock-Free Programming: CAS, ABA, and Memory Order
Replace mutex hot spots with atomics and CAS: a lock-free stack, Michael-Scott and SPSC queues, picking a memory_order, and fixing ABA with tagged pointers.
-
C++ std::thread basics — join/detach mistakes and mutex
C++ std::thread: create, join, detach; mutex, condition_variable, atomic, jthread; process vs thread; common mistakes and production patterns.
-
C++ Multithreading Crashes: Data Races, mutex, and atomic
Fix intermittent multithreaded crashes: data races vs race conditions, std::mutex, atomics, false sharing basics, condition variables.