squid-
cache.org
Optimising Web Delivery
Docs
Download
Donate
Support
About
Contact
Shop
Blog
src
base
AsyncCallQueue.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2023 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_ASYNCCALLQUEUE_H
10
#define SQUID_ASYNCCALLQUEUE_H
11
12
#include "
base/AsyncCallList.h
"
13
#include "
base/forward.h
"
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
(
const
AsyncCallPointer
&call) {
scheduled
.
add
(call); }
25
26
// fire all scheduled calls; returns true if at least one was fired
27
bool
fire
();
28
29
private
:
30
AsyncCallQueue
() =
default
;
31
32
AsyncCallList
scheduled
;
33
34
static
AsyncCallQueue
*
TheInstance
;
35
};
36
37
#endif
/* SQUID_ASYNCCALLQUEUE_H */
38
AsyncCallList.h
forward.h
AsyncCallList
Definition:
AsyncCallList.h:18
AsyncCallList::add
void add(const AsyncCallPointer &)
stores the given async call
Definition:
AsyncCallList.cc:15
AsyncCallQueue
Definition:
AsyncCallQueue.h:18
AsyncCallQueue::schedule
void schedule(const AsyncCallPointer &call)
Definition:
AsyncCallQueue.h:24
AsyncCallQueue::TheInstance
static AsyncCallQueue * TheInstance
Definition:
AsyncCallQueue.h:34
AsyncCallQueue::AsyncCallQueue
AsyncCallQueue()=default
AsyncCallQueue::Instance
static AsyncCallQueue & Instance()
Definition:
AsyncCallQueue.cc:36
AsyncCallQueue::fire
bool fire()
Definition:
AsyncCallQueue.cc:21
AsyncCallQueue::scheduled
AsyncCallList scheduled
calls waiting to be fire()d, in FIFO order
Definition:
AsyncCallQueue.h:32
RefCount< AsyncCall >
Introduction
About Squid
Why Squid?
Squid Developers
How to Donate
How to Help Out
Getting Squid
Squid Source Packages
Squid Deployment Case-Studies
Squid Software Foundation
Documentation
Quick Setup
Configuration:
Reference
Examples
FAQ
and
Wiki
Guide Books:
Beginners
Definitive
Non-English
More...
Support
Security Advisories
Bugzilla Database
Mailing lists
Contacting us
Commercial services
Project Sponsors
Squid-based products
Miscellaneous
Developer Resources
Related Writings
Related Software:
Authenticators
Ecap
Icap
Ident
Log Analysis
Monitor
Proxies
Redirectors
General
Squid Artwork
Web Site Translations
Japanese
Mirrors
Website:
il
...
full list
FTP Package Archive