DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
ers::LockStream Struct Reference

Lock implementation for an ERS stream. More...

#include <LockStream.hpp>

Inheritance diagram for ers::LockStream:
[legend]
Collaboration diagram for ers::LockStream:
[legend]

Public Member Functions

void write (const Issue &issue) override
 
- Public Member Functions inherited from ers::OutputStream
virtual ~OutputStream ()
 Sends the issue into this stream.
 

Private Attributes

std::mutex m_mutex
 

Additional Inherited Members

- Protected Member Functions inherited from ers::OutputStream
 OutputStream ()
 
OutputStreamchained ()
 
virtual bool isNull () const
 

Detailed Description

Lock implementation for an ERS stream.

This class can be used to lock a particular ERS output streams to prevent output to this stream produced by concurrent threads from been mixed up. In order to employ this implementation in a stream configuration the name to be used is "lock". E.g. the following configuration will assure that the output sent to the LOG stream by concurrent threads is never mixed up:

    export DUNEDAQ_ERS_LOG="lock,stdout"
Author
Serguei Kolos

Definition at line 36 of file LockStream.hpp.

Member Function Documentation

◆ write()

void ers::LockStream::write ( const Issue & issue)
overridevirtual

Implements ers::OutputStream.

Member Data Documentation

◆ m_mutex

std::mutex ers::LockStream::m_mutex
private

Definition at line 41 of file LockStream.hpp.


The documentation for this struct was generated from the following file: