C++ Multithreading Cookbook