libeblearntools
ebl::mutex_ostream Class Reference

#include <thread.h>

List of all members.

Public Member Functions

 mutex_ostream (std::ostream &o, mutex *m=NULL, const char *prefix=NULL)

Protected Attributes

sbuf buffer

Detailed Description

An ostream class that contains a mutex, preventing different threads from writing before current thread finishes outputting a line.


Constructor & Destructor Documentation

ebl::mutex_ostream::mutex_ostream ( std::ostream &  o,
mutex m = NULL,
const char *  prefix = NULL 
)

Output to ostream o but prevent other

Parameters:
mThe mutex shared by all threads used to synchronize.
prefixIf not null, prefix is printed before each new line.

The documentation for this class was generated from the following files: