aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Database/MySQLConnection.h
diff options
context:
space:
mode:
authorleak <leak@bitmx.net>2014-06-30 18:37:23 +0200
committerleak <leak@bitmx.net>2014-06-30 18:37:23 +0200
commitd39a013b6b979a5158bf86c37a197cb902b2c2f9 (patch)
treed39b71809197052500bdbc7399276aa15dd96ee8 /src/server/shared/Database/MySQLConnection.h
parent9588c1d92b20573c2bd214b44a15e41fd8cf35b4 (diff)
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
Diffstat (limited to 'src/server/shared/Database/MySQLConnection.h')
-rw-r--r--src/server/shared/Database/MySQLConnection.h5
1 files changed, 3 insertions, 2 deletions
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<SQLOperation*>* 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<SQLOperation*>* 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)