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