]> git.ipfire.org Git - thirdparty/squid.git/blame - src/AsyncCallQueue.h
Cleanup: zap CVS Id tags
[thirdparty/squid.git] / src / AsyncCallQueue.h
CommitLineData
cfa20cf5 1
2/*
262a0e14 3 * $Id$
cfa20cf5 4 *
5 */
6
7#ifndef SQUID_ASYNCCALLQUEUE_H
8#define SQUID_ASYNCCALLQUEUE_H
9
10#include "squid.h"
11#include "AsyncCall.h"
12
13//class AsyncCall;
14
15// The queue of asynchronous calls. All calls are fired during a single main
16// loop iteration until the queue is exhausted
17class AsyncCallQueue
18{
19public:
20 // there is only one queue
26ac0430 21 static AsyncCallQueue &Instance();
cfa20cf5 22
23 // make this async call when we get a chance
26ac0430 24 void schedule(AsyncCall::Pointer &call);
cfa20cf5 25
26 // fire all scheduled calls; returns true if at least one was fired
27 bool fire();
28
29private:
30 AsyncCallQueue();
31
32 void fireNext();
33
34 AsyncCall::Pointer theHead;
35 AsyncCall::Pointer theTail;
36
37 static AsyncCallQueue *TheInstance;
38};
39
40#endif /* SQUID_ASYNCCALLQUEUE_H */