How to easily make std::cout thread-safe? How to easily make std::cout thread-safe? multithreading multithreading