Serializing access to Streams
Last december, I was at Meeting C++ in Berlin and I attended - among others - the talk Multithreading done right? by Rainer Grimm. In most of the examples, 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 …
Leggi tutto.