blob: b6b9e7c2b6b21387a189e6f8a5a99db86ec98512 (
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
|
class CommandMutex : public Thread
{
public:
// Mutex used by this command to allow the core to drop and pick up processing of it at will
Mutex mutex;
// Set to true when this thread is processing data that is not thread safe (eg, the command)
bool processing;
Command *command;
CommandSource source;
std::vector<Anope::string> params;
CommandMutex() : Thread(), processing(true) { }
~CommandMutex() { }
virtual void Run() = 0;
virtual void Lock() = 0;
virtual void Unlock() = 0;
};
class AsynchCommandsService : public Service
{
public:
AsynchCommandsService(Module *o, const Anope::string &n) : Service(o, n) { }
virtual CommandMutex *CurrentCommand() = 0;
};
|