#include <JobWait.h>
![Collaboration graph](classJobWaitBase__coll__graph.png)
Public Member Functions | |
JobWaitBase () | |
~JobWaitBase () | |
JobWaitBase (JobWaitBase &&)=delete | |
no copying of any kind: each waiting context needs a dedicated AsyncCall More... | |
operator bool () const | |
bool | waiting () const |
void | finish () |
void | cancel (const char *reason) |
void | print (std::ostream &) const |
summarizes what we are waiting for (for debugging) More... | |
Protected Member Functions | |
void | start_ (AsyncJob::Pointer, AsyncCall::Pointer) |
starts waiting for the given job to call the given callback More... | |
Private Member Functions | |
void | clear () |
the common part of finish() and cancel() More... | |
Private Attributes | |
AsyncJob::Pointer | job_ |
the job that we are waiting to call us back (or nil) More... | |
AsyncCall::Pointer | callback_ |
the call we are waiting for the job_ to make (or nil) More... | |
Detailed Description
Manages waiting for an AsyncJob callback. Use type-safe JobWait instead. This base class does not contain code specific to the actual Job type.
Constructor & Destructor Documentation
◆ JobWaitBase() [1/2]
|
default |
◆ ~JobWaitBase()
JobWaitBase::~JobWaitBase | ( | ) |
Definition at line 18 of file JobWait.cc.
References cancel().
◆ JobWaitBase() [2/2]
|
delete |
Member Function Documentation
◆ cancel()
void JobWaitBase::cancel | ( | const char * | reason | ) |
aborts wait (if any) before receiving the call back does nothing if we are not waiting
Definition at line 54 of file JobWait.cc.
References callback_, CallJobHere, AsyncCall::cancel(), clear(), AsyncCall::debugLevel, AsyncCall::debugSection, and job_.
Referenced by ~JobWaitBase().
◆ clear()
|
inlineprivate |
◆ finish()
void JobWaitBase::finish | ( | ) |
ends wait (after receiving the call back) forgets the job which is likely to be gone by now
Definition at line 44 of file JobWait.cc.
◆ operator bool()
|
inlineexplicit |
◆ print()
void JobWaitBase::print | ( | std::ostream & | os | ) | const |
Definition at line 71 of file JobWait.cc.
References callback_, CbcPointer< Cbc >::get(), AsyncCall::id, and job_.
Referenced by operator<<().
◆ start_()
|
protected |
Definition at line 24 of file JobWait.cc.
References assert, callback_, CbcPointer< Cbc >::get(), job_, AsyncJob::Start(), and waiting().
◆ waiting()
|
inline |
Member Data Documentation
◆ callback_
|
private |
◆ job_
|
private |
The documentation for this class was generated from the following files:
- src/base/JobWait.h
- src/base/JobWait.cc
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:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products