9#ifndef SQUID_SRC_BASE_JOBWAIT_H
10#define SQUID_SRC_BASE_JOBWAIT_H
28 explicit operator bool()
const {
return waiting(); }
40 void cancel(
const char *reason);
43 void print(std::ostream &)
const;
std::ostream & operator<<(std::ostream &os, const JobWaitBase &wait)
void clear()
make pointer not set; does not invalidate cbdata
void clear()
the common part of finish() and cancel()
void start_(AsyncJob::Pointer, AsyncCall::Pointer)
starts waiting for the given job to call the given callback
void cancel(const char *reason)
void print(std::ostream &) const
summarizes what we are waiting for (for debugging)
AsyncJob::Pointer job_
the job that we are waiting to call us back (or nil)
JobWaitBase(JobWaitBase &&)=delete
no copying of any kind: each waiting context needs a dedicated AsyncCall
AsyncCall::Pointer callback_
the call we are waiting for the job_ to make (or nil)
JobPointer typedJob_
nearly duplicates JobWaitBase::job_ but exposes the actual job type
CbcPointer< Job > JobPointer
void start(const JobPointer &aJob, const AsyncCall::Pointer &aCallback)
starts waiting for the given job to call the given callback