Multithreaded Applications in C++