From d39a013b6b979a5158bf86c37a197cb902b2c2f9 Mon Sep 17 00:00:00 2001 From: leak Date: Mon, 30 Jun 2014 18:37:23 +0200 Subject: Replaced ACE_Task_Base based DatabaseWorker with PCQ Note: Not exactly sure how shutdown should be handled, currently the queue clears itself out before shutting down This might need to be changed if the queue should be fully processed before being deleted --- src/server/shared/Database/MySQLConnection.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/server/shared/Database/MySQLConnection.h') diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h index 512df7c16c7..3b7efeb5846 100644 --- a/src/server/shared/Database/MySQLConnection.h +++ b/src/server/shared/Database/MySQLConnection.h @@ -20,6 +20,7 @@ #include "DatabaseWorkerPool.h" #include "Transaction.h" #include "Util.h" +#include "ProducerConsumerQueue.h" #ifndef _MYSQLCONNECTION_H #define _MYSQLCONNECTION_H @@ -70,7 +71,7 @@ class MySQLConnection public: MySQLConnection(MySQLConnectionInfo& connInfo); //! Constructor for synchronous connections. - MySQLConnection(ACE_Activation_Queue* queue, MySQLConnectionInfo& connInfo); //! Constructor for asynchronous connections. + MySQLConnection(ProducerConsumerQueue* queue, MySQLConnectionInfo& connInfo); //! Constructor for asynchronous connections. virtual ~MySQLConnection(); virtual bool Open(); @@ -125,7 +126,7 @@ class MySQLConnection bool _HandleMySQLErrno(uint32 errNo); private: - ACE_Activation_Queue* m_queue; //! Queue shared with other asynchronous connections. + ProducerConsumerQueue* m_queue; //! Queue shared with other asynchronous connections. DatabaseWorker* m_worker; //! Core worker task. MYSQL * m_Mysql; //! MySQL Handle. MySQLConnectionInfo& m_connectionInfo; //! Connection info (used for logging) -- cgit v1.2.3