9#ifndef SQUID_SRC_BASE_ASYNCCALL_H
10#define SQUID_SRC_BASE_ASYNCCALL_H
45 AsyncCall(
int aDebugSection,
int aDebugLevel,
const char *aName);
51 bool cancel(
const char *reason);
57 void print(std::ostream &os);
116 virtual void print(std::ostream &os)
const = 0;
123template <
class DialerClass>
129 AsyncCallT(
int aDebugSection,
int aDebugLevel,
const char *aName,
154template <
class Dialer>
156asyncCall(
int aDebugSection,
int aDebugLevel,
const char *aName,
157 const Dialer &aDialer)
166#define ScheduleCallHere(call) ScheduleCall(__FILE__, __LINE__, (call))
std::ostream & operator<<(std::ostream &os, AsyncCall &call)
RefCount< AsyncCallT< Dialer > > asyncCall(int aDebugSection, int aDebugLevel, const char *aName, const Dialer &aDialer)
bool ScheduleCall(const char *fileName, int fileLine, const AsyncCall::Pointer &)
#define RefCountable
The locking interface for use on Reference-Counted classes.
squidaio_request_t * head
RefCount< AsyncCall > AsyncCallPointer
CallDialer * getDialer() override
AsyncCallT(int aDebugSection, int aDebugLevel, const char *aName, const Dialer &aDialer)
AsyncCallT & operator=(const AsyncCallT &)
AsyncCallT(const AsyncCallT< Dialer > &o)
void dequeue(AsyncCall::Pointer &head, AsyncCall::Pointer &prev)
remove us from the queue; we are head unless we are queued after prev
const InstanceId< AsyncCall > id
AsyncCall(const AsyncCall &)
bool cancel(const char *reason)
AsyncCall::Pointer & Next()
void print(std::ostream &os)
virtual CallDialer * getDialer()=0
AsyncCall::Pointer theNext
for AsyncCallList and similar lists
CodeContext::Pointer codeContext
what the callee is expected to work on
void setNext(AsyncCall::Pointer aNext)
virtual void print(std::ostream &os) const =0