summaryrefslogtreecommitdiff
path: root/src/common/Database/DatabaseWorker.h
blob: 9f15f13dcd4e13b9bfca7260aeed246dbc1b9898 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * Copyright (C) 2016+     AzerothCore <www.azerothcore.org>
 * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
 * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
 */

#ifndef _WORKERTHREAD_H
#define _WORKERTHREAD_H

#include <ace/Task.h>
#include <ace/Activation_Queue.h>

class MySQLConnection;

class DatabaseWorker : protected ACE_Task_Base
{
public:
    DatabaseWorker(ACE_Activation_Queue* new_queue, MySQLConnection* con);

    ///- Inherited from ACE_Task_Base
    int svc() override;
    int wait() override { return ACE_Task_Base::wait(); }

private:
    DatabaseWorker() : ACE_Task_Base() { }
    ACE_Activation_Queue* m_queue;
    MySQLConnection* m_conn;
};

#endif