]> git.ipfire.org Git - thirdparty/squid.git/blob - src/CompletionDispatcher.h
b455b4aa5883242657e8e9104cfa2814d0c9c391
[thirdparty/squid.git] / src / CompletionDispatcher.h
1 /*
2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #ifndef SQUID_COMPLETIONDISPATCHER_H
10 #define SQUID_COMPLETIONDISPATCHER_H
11
12 /* Dispatch code to handle events that have completed. Completed events are queued
13 * with a completion dispatcher by the OS Async engine - i.e. the poll or kqueue or
14 * select loop, or a signal reciever, or the diskd/diskthreads/etc modules.
15 */
16
17 class CompletionDispatcher
18 {
19
20 public:
21
22 virtual ~CompletionDispatcher() {}
23
24 /* dispatch events. This should return true if there were events dispatched
25 * between the last call to dispatch() returning and this call returning.
26 */
27 virtual bool dispatch() = 0;
28 };
29
30 #endif /* SQUID_COMPLETIONDISPATCHER_H */
31