A new blog post containing runnable code from the Italian C++ Community:
by Marco Foco
From the article:
Two or more threads were writing to cout using the form:cout << someData << "some string" << someObject << endl;
And one of the problems was that data sent from one thread often interrupted another thread, so the output was always messed up. [...] I started designing a solution by giving myself some guidelines, here listed in order of importance...