This ensures consistency of the simultaneous get and set procedure.
git-svn-id: https://svn.dealii.org/trunk@29364
0785d39b-7218-0410-832d-
ea1e28bc413d
std::ios::fmtflags
LogStream::flags(const std::ios::fmtflags f)
{
+ Threads::Mutex::ScopedLock lock(log_lock);
+
std::ios::fmtflags tmp = stream_flags;
stream_flags = f;
return tmp;
std::streamsize
LogStream::precision (const std::streamsize prec)
{
+ Threads::Mutex::ScopedLock lock(log_lock);
+
std::streamsize tmp = stream_precision;
stream_precision = prec;
return tmp;
std::streamsize
LogStream::width (const std::streamsize wide)
{
+ Threads::Mutex::ScopedLock lock(log_lock);
+
std::streamsize tmp = stream_width;
stream_width = wide;
return tmp;
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams