Transient Recorder Framework
Public Member Functions | Friends | List of all members
TRWorkerThread Class Reference

A simple worker thread with a queue of tasks. More...

#include <TRWorkerThread.h>

Inheritance diagram for TRWorkerThread:

Public Member Functions

 TRWorkerThread (std::string const &thread_name)
 Constructor for the worker thread. More...
 
 ~TRWorkerThread ()
 Destructor for the worker thread. More...
 
void start ()
 Start the worker thread. More...
 
void stop ()
 Send a signal to the worker thread and wait for it stop.
 

Friends

class TRWorkerThreadTask
 

Detailed Description

A simple worker thread with a queue of tasks.

Implements a worker thread to which arbitrary tasks can be queued for execution.

Constructor & Destructor Documentation

TRWorkerThread::TRWorkerThread ( std::string const &  thread_name)

Constructor for the worker thread.

After construction, start should be called to start operation.

Parameters
thread_nameThe name for the thread.
TRWorkerThread::~TRWorkerThread ( )

Destructor for the worker thread.

It does stop(), nevertheless it is a good idea to call stop() explicitly before destruction, due to possible issues with virtual functions.

Member Function Documentation

void TRWorkerThread::start ( )

Start the worker thread.

This should be called once after construction and must not be called again.


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