Collage  1.7.0
High-performance C++ library for developing object-oriented distributed applications.
co::WorkerThread< Q > Class Template Reference

A worker thread processing items out of a CommandQueue. More...

#include <worker.h>

+ Inheritance diagram for co::WorkerThread< Q >:
+ Collaboration diagram for co::WorkerThread< Q >:

Public Member Functions

 WorkerThread (const size_t maxSize=ULONG_MAX)
 Construct a new worker thread. More...
 
virtual ~WorkerThread ()
 Destruct the worker. More...
 
Q * getWorkerQueue ()
 

Protected Member Functions

CO_WORKER_API void run () override
 
virtual bool stopRunning ()
 
virtual bool notifyIdle ()
 

Detailed Description

template<class Q>
class co::WorkerThread< Q >

A worker thread processing items out of a CommandQueue.

Definition at line 72 of file types.h.

Constructor & Destructor Documentation

template<class Q >
co::WorkerThread< Q >::WorkerThread ( const size_t  maxSize = ULONG_MAX)
inlineexplicit

Construct a new worker thread.

Version
1.0

Definition at line 42 of file worker.h.

template<class Q >
virtual co::WorkerThread< Q >::~WorkerThread ( )
inlinevirtual

Destruct the worker.

Version
1.0

Definition at line 48 of file worker.h.

Member Function Documentation

template<class Q >
Q* co::WorkerThread< Q >::getWorkerQueue ( )
inline
Returns
the queue to the worker thread.
Version
1.0

Definition at line 50 of file worker.h.

References co::WorkerThread< Q >::run().

+ Here is the call graph for this function:

template<class Q >
virtual bool co::WorkerThread< Q >::notifyIdle ( )
inlineprotectedvirtual
Returns
true to indicate pending idle tasks.
Version
1.0

Definition at line 58 of file worker.h.

template<class Q >
void co::WorkerThread< Q >::run ( )
overrideprotected
See also
lunchbox::Thread::run()

Definition at line 26 of file worker.ipp.

Referenced by co::WorkerThread< Q >::getWorkerQueue().

+ Here is the caller graph for this function:

template<class Q >
virtual bool co::WorkerThread< Q >::stopRunning ( )
inlineprotectedvirtual
Returns
true to stop the worker thread.
Version
1.0

Definition at line 56 of file worker.h.


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