lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Pds_Epics::WorkQueue Class Reference

Queue and thread that move monitor event handling off the pvAccess threads (per the code comment). More...

#include <MonTracker.hh>

Inherits epicsThreadRunable.

Public Member Functions

 WorkQueue ()
 Start the worker thread, named Monitor handler.
 
 ~WorkQueue ()
 Call close().
 
void close ()
 Stop accepting events, wake the thread and wait for it to exit.
 
void push (const weak_type &cb, const pvac::MonitorEvent &evt)
 Queue evt for worker cb and wake the thread if the queue was empty; ignored after close().
 
virtual void run () OVERRIDE FINAL
 Thread body: until close(), take each queued event and call process() on its worker if the worker still exists, printing any std::exception it throws.
 

Detailed Description

Queue and thread that move monitor event handling off the pvAccess threads (per the code comment).

It holds only weak pointers, so workers must be kept alive elsewhere.

Constructor & Destructor Documentation

◆ WorkQueue()

Pds_Epics::WorkQueue::WorkQueue ( )

Start the worker thread, named Monitor handler.

◆ ~WorkQueue()

Pds_Epics::WorkQueue::~WorkQueue ( )

Call close().

Member Function Documentation

◆ close()

void Pds_Epics::WorkQueue::close ( )

Stop accepting events, wake the thread and wait for it to exit.

◆ push()

void Pds_Epics::WorkQueue::push ( const weak_type &  cb,
const pvac::MonitorEvent &  evt 
)

Queue evt for worker cb and wake the thread if the queue was empty; ignored after close().

◆ run()

virtual void Pds_Epics::WorkQueue::run ( )
virtual

Thread body: until close(), take each queued event and call process() on its worker if the worker still exists, printing any std::exception it throws.


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