#include <MessageServicePresence.h>
Public Member Functions | |
MessageServicePresence () | |
~MessageServicePresence () | |
Private Member Functions | |
MessageServicePresence (MessageServicePresence const &) | |
void | operator= (MessageServicePresence const &) |
Private Attributes | |
boost::shared_ptr< ThreadQueue > | m_queue |
boost::thread | m_scribeThread |
Definition at line 16 of file MessageServicePresence.h.
edm::service::MessageServicePresence::MessageServicePresence | ( | ) |
Definition at line 52 of file MessageServicePresence.cc.
References m_queue, and edm::MessageLoggerQ::setMLscribe_ptr().
: Presence() , m_queue (new ThreadQueue) , m_scribeThread ( ( (void) MessageLoggerQ::instance() // ensure Q's static data init'd , boost::bind(&runMessageLoggerScribe, m_queue) // start a new thread, run rMLS(m_queue) // ChangeLog 2 ) ) // Note that m_scribeThread, which is a boost::thread, has a single-argument ctor - // just the function to be run. But we need to do something first, namely, // ensure that the MessageLoggerQ is in a valid state - and that requires // a statement. So we bundle that statement in parenthesis, separated by // a comma, with the argument we really want (runMessageLoggerScribe). This // creates a single argument, wheich evaluates to runMessageLoggerScribe after // first executing the before-the-comma statement. { MessageLoggerQ::setMLscribe_ptr( boost::shared_ptr<edm::service::AbstractMLscribe> (new MainThreadMLscribe(m_queue))); // change log 3 //std::cout << "MessageServicePresence ctor\n"; }
edm::service::MessageServicePresence::~MessageServicePresence | ( | ) |
Definition at line 77 of file MessageServicePresence.cc.
References m_scribeThread, edm::MessageLoggerQ::MLqEND(), and edm::MessageLoggerQ::setMLscribe_ptr().
{ MessageLoggerQ::MLqEND(); m_scribeThread.join(); MessageLoggerQ::setMLscribe_ptr (boost::shared_ptr<edm::service::AbstractMLscribe>()); // change log 3 }
edm::service::MessageServicePresence::MessageServicePresence | ( | MessageServicePresence const & | ) | [private] |
void edm::service::MessageServicePresence::operator= | ( | MessageServicePresence const & | ) | [private] |
boost::shared_ptr<ThreadQueue> edm::service::MessageServicePresence::m_queue [private] |
Definition at line 29 of file MessageServicePresence.h.
Referenced by MessageServicePresence().
boost::thread edm::service::MessageServicePresence::m_scribeThread [private] |
Definition at line 30 of file MessageServicePresence.h.
Referenced by ~MessageServicePresence().