]> git.ipfire.org Git - thirdparty/squid.git/blob - src/AsyncCallQueue.h
Cleanup: zap CVS Id tags
[thirdparty/squid.git] / src / AsyncCallQueue.h
1
2 /*
3 * $Id$
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
17 class AsyncCallQueue
18 {
19 public:
20 // there is only one queue
21 static AsyncCallQueue &Instance();
22
23 // make this async call when we get a chance
24 void schedule(AsyncCall::Pointer &call);
25
26 // fire all scheduled calls; returns true if at least one was fired
27 bool fire();
28
29 private:
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 */