MultiThreading
Theory to start
Multithreading : thumb rules
C++ implementation
Step by step multithreading : Chapter 1.
Join()
Step by step multithreading : Chapter 2.
detach()
Step by step multithreading : Chapter 3.
exceptions and threading
Step by step multithreading : Chapter 4.
functor
std::ref()
std::move()
get_id()
Step by step multithreading : Chapter 5.
mutex
lock_guard
Step by step multithreading : Chapter 6.
Deadlock
Step by step multithreading : Chapter 7.
unique_lock
unique_lock vs lock_gaurd
thread safe program - singleton.
Step by step multithreading : Chapter 8.
Conditional variable.
Step by step multithreading : Chapter 9.
future
promise
Step by step multithreading : Chapter 10.
atomic_flag
atomic
Book Reference - Concurrency in action
Note : - I want to recommend you to read concurrency in action book. My blogs covers executable examples to demonstrate key concepts of threading inspired by this book.
Chapter 1 :
To be added.
add
Multi-threading standard questions -
Create two threads, lets name it - odd-thread and even-thread. Print 1, 3, 5, .. all odd numbers from odd-thread, and print 2, 4, 5, all even numbers from even-thread. But numbers should print in sequential manner, OP - 1,2,3,4,5,6,7,8... 100