Squid Web Cache master
Loading...
Searching...
No Matches
AsyncCallList.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 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_SRC_BASE_ASYNCCALLLIST_H
10#define SQUID_SRC_BASE_ASYNCCALLLIST_H
11
12#include "base/AsyncCall.h"
13#include "base/RefCount.h"
14
18{
19public:
20 AsyncCallList() = default;
21 // prohibit copying: no AsyncCall should be present in two lists
22 AsyncCallList(const AsyncCallList &) = delete;
24
26 void add(const AsyncCallPointer &);
27
32
34 size_t size() const { return length; }
35
36private:
39 size_t length = 0;
40};
41
42#endif /* SQUID_SRC_BASE_ASYNCCALLLIST_H */
43
AsyncCallPointer tail
the latest still-stored call (or nil)
size_t size() const
the number of currently stored calls
AsyncCallList(const AsyncCallList &)=delete
AsyncCallPointer extract()
AsyncCallList()=default
AsyncCallPointer head
the earliest still-stored call (or nil)
void add(const AsyncCallPointer &)
stores the given async call
AsyncCallList & operator=(const AsyncCallList &)=delete