QxOrm 1.4.9
C++ Object Relational Mapping library
Loading...
Searching...
No Matches

qx::service::QxThreadPool : thread-safe thread pool to manage list of threads for executing all transactions of QxService module More...

#include <QxThreadPool.h>

Inheritance diagram for qx::service::QxThreadPool:

Signals

void error (const QString &err, qx::service::QxTransaction_ptr transaction)
 
void transactionStarted (qx::service::QxTransaction_ptr transaction)
 
void transactionFinished (qx::service::QxTransaction_ptr transaction)
 
void customRequestHandler (qx::service::QxTransaction_ptr transaction)
 
void serverIsRunning (bool bIsRunning, qx::service::QxServer *pServer)
 

Public Member Functions

 QxThreadPool ()
 
virtual ~QxThreadPool ()
 
bool isStopped () const
 
QxThreadgetAvailable ()
 
void setAvailable (QxThread *p)
 
void raiseError (const QString &err, QxTransaction_ptr transaction)
 

Static Public Member Functions

static void sleepThread (unsigned long msecs)
 

Protected Member Functions

virtual void run ()
 
void runServer ()
 
void initServices ()
 
void clearServices ()
 

Protected Attributes

QList< QxThread * > m_lstAllServices
 List of all services created by 'QxThreadPool'.
 
QQueue< QxThread * > m_lstAvailable
 List of services available to execute process.
 
bool m_bIsStopped
 Flag to indicate if thread has been stopped.
 
QMutex m_mutex
 Mutex => 'QxThreadPool' is thread-safe.
 

Detailed Description

qx::service::QxThreadPool : thread-safe thread pool to manage list of threads for executing all transactions of QxService module

Click here to access to a tutorial to explain how to work with QxService module.

Definition at line 75 of file QxThreadPool.h.

Constructor & Destructor Documentation

◆ QxThreadPool()

qx::service::QxThreadPool::QxThreadPool ( )
inline

Definition at line 89 of file QxThreadPool.h.

◆ ~QxThreadPool()

virtual qx::service::QxThreadPool::~QxThreadPool ( )
inlinevirtual

Definition at line 90 of file QxThreadPool.h.

Member Function Documentation

◆ clearServices()

void qx::service::QxThreadPool::clearServices ( )
protected

◆ customRequestHandler

void qx::service::QxThreadPool::customRequestHandler ( qx::service::QxTransaction_ptr transaction)
signal

◆ error

void qx::service::QxThreadPool::error ( const QString & err,
qx::service::QxTransaction_ptr transaction )
signal

◆ getAvailable()

QxThread * qx::service::QxThreadPool::getAvailable ( )

◆ initServices()

void qx::service::QxThreadPool::initServices ( )
protected

◆ isStopped()

bool qx::service::QxThreadPool::isStopped ( ) const

◆ raiseError()

void qx::service::QxThreadPool::raiseError ( const QString & err,
QxTransaction_ptr transaction )

◆ run()

virtual void qx::service::QxThreadPool::run ( )
protectedvirtual

◆ runServer()

void qx::service::QxThreadPool::runServer ( )
protected

◆ serverIsRunning

void qx::service::QxThreadPool::serverIsRunning ( bool bIsRunning,
qx::service::QxServer * pServer )
signal

◆ setAvailable()

void qx::service::QxThreadPool::setAvailable ( QxThread * p)

◆ sleepThread()

static void qx::service::QxThreadPool::sleepThread ( unsigned long msecs)
inlinestatic

Definition at line 97 of file QxThreadPool.h.

◆ transactionFinished

void qx::service::QxThreadPool::transactionFinished ( qx::service::QxTransaction_ptr transaction)
signal

◆ transactionStarted

void qx::service::QxThreadPool::transactionStarted ( qx::service::QxTransaction_ptr transaction)
signal

Member Data Documentation

◆ m_bIsStopped

bool qx::service::QxThreadPool::m_bIsStopped
protected

Flag to indicate if thread has been stopped.

Definition at line 84 of file QxThreadPool.h.

◆ m_lstAllServices

QList<QxThread *> qx::service::QxThreadPool::m_lstAllServices
protected

List of all services created by 'QxThreadPool'.

Definition at line 82 of file QxThreadPool.h.

◆ m_lstAvailable

QQueue<QxThread *> qx::service::QxThreadPool::m_lstAvailable
protected

List of services available to execute process.

Definition at line 83 of file QxThreadPool.h.

◆ m_mutex

QMutex qx::service::QxThreadPool::m_mutex
protected

Mutex => 'QxThreadPool' is thread-safe.

Definition at line 85 of file QxThreadPool.h.


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