std::thread
Best way of using threads independently.
Works with both lamdas and functions:
void foo(int a, int b);
std: :thread t1(foo, 123, 456);
std: :thread t2([] { foo(123, 456); });
Join can be used to wait for a thread to finish
t1.join(); t2.join();
Threads are copyable, not movable, like futures.
Thread pools:
vector<thread> threadPool;</thread>
for(int i = 0; i < 10; i++)
threadPool.emplace_back([i] {safe_print(i); });
for(auto& t: threadPool)
t.join();
Mutexes
Important piece but expensive.
Several types:
Condition variables
std::condition_variable:
A mutex must be held when modifying the variables that can change truth of the condition.

atomic operations
Usually much more efficient then mutexes
std::atomic<t></t>
