libeblearntools
|
#include <thread.h>
Public Member Functions | |
mutex_ostream (std::ostream &o, mutex *m=NULL, const char *prefix=NULL) | |
Protected Attributes | |
sbuf | buffer |
An ostream class that contains a mutex, preventing different threads from writing before current thread finishes outputting a line.
ebl::mutex_ostream::mutex_ostream | ( | std::ostream & | o, |
mutex * | m = NULL , |
||
const char * | prefix = NULL |
||
) |
Output to ostream o but prevent other
m | The mutex shared by all threads used to synchronize. |
prefix | If not null, prefix is printed before each new line. |