36#ifdef _QX_ENABLE_QT_NETWORK
37#ifndef _QX_SERVICE_THREAD_POOL_H_
38#define _QX_SERVICE_THREAD_POOL_H_
51#ifdef _QX_NO_PRECOMPILED_HEADER
57#include <QtCore/qqueue.h>
90 virtual ~QxThreadPool() {
if (isRunning()) { qDebug(
"[QxOrm] qx::service::QxThreadPool thread is running : %s",
"quit and wait"); quit(); wait(); } }
97 static void sleepThread(
unsigned long msecs) { QThread::msleep(msecs); }
List of parameters to compile and build QxOrm library.
Server side to manage a thread pool of incoming connections (new request from client)
Transaction of QxService module (contains request from client and reply from server)
qx::service::QxServer : server side to manage a thread pool of incoming connections (new request from...
qx::service::QxThread : thread to execute a transaction of QxService module
qx::service::QxThreadPool : thread-safe thread pool to manage list of threads for executing all trans...
QQueue< QxThread * > m_lstAvailable
List of services available to execute process.
void setAvailable(QxThread *p)
QxThread * getAvailable()
QList< QxThread * > m_lstAllServices
List of all services created by 'QxThreadPool'.
QMutex m_mutex
Mutex => 'QxThreadPool' is thread-safe.
void transactionStarted(qx::service::QxTransaction_ptr transaction)
void serverIsRunning(bool bIsRunning, qx::service::QxServer *pServer)
bool m_bIsStopped
Flag to indicate if thread has been stopped.
void raiseError(const QString &err, QxTransaction_ptr transaction)
void customRequestHandler(qx::service::QxTransaction_ptr transaction)
static void sleepThread(unsigned long msecs)
void transactionFinished(qx::service::QxTransaction_ptr transaction)
void error(const QString &err, qx::service::QxTransaction_ptr transaction)
std::shared_ptr< QxTransaction > QxTransaction_ptr
std::shared_ptr< QxThreadPool > QxThreadPool_ptr
Root namespace for all QxOrm library features.