proxygen
folly::EventBase::LoopCallback Class Referenceabstract

#include <EventBase.h>

Inheritance diagram for folly::EventBase::LoopCallback:
CountedLoopCallback CountedLoopCallback folly::AsyncSocket::ImmediateReadCB folly::EventBase::FunctionLoopCallback folly::EventBase::StackFunctionLoopCallback folly::fibers::EventBaseLoopController::ControllerCallback folly::MemoryIdlerTimeout proxygen::compress::CompressionScheme proxygen::HTTPSession proxygen::HTTPSession::ShutdownTransportCallback TerminateTestCallback wangle::ConnectionManager::DrainHelper wangle::OutputBufferingHandler

Public Member Functions

virtual ~LoopCallback ()=default
 
virtual void runLoopCallback () noexcept=0
 
void cancelLoopCallback ()
 
bool isLoopCallbackScheduled () const
 

Private Types

typedef boost::intrusive::list< LoopCallback, boost::intrusive::constant_time_size< false > > List
 

Private Attributes

std::shared_ptr< RequestContextcontext_
 

Friends

class EventBase
 
class VirtualEventBase
 

Detailed Description

A callback interface to use with runInLoop()

Derive from this class if you need to delay some code execution until the next iteration of the event loop. This allows you to schedule code to be invoked from the top-level of the loop, after your immediate callers have returned.

If a LoopCallback object is destroyed while it is scheduled to be run in the next loop iteration, it will automatically be cancelled.

Definition at line 148 of file EventBase.h.

Member Typedef Documentation

typedef boost::intrusive:: list<LoopCallback, boost::intrusive::constant_time_size<false> > folly::EventBase::LoopCallback::List
private

Definition at line 167 of file EventBase.h.

Constructor & Destructor Documentation

virtual folly::EventBase::LoopCallback::~LoopCallback ( )
virtualdefault

Member Function Documentation

Friends And Related Function Documentation

friend class EventBase
friend

Definition at line 170 of file EventBase.h.

friend class VirtualEventBase
friend

Definition at line 171 of file EventBase.h.

Member Data Documentation

std::shared_ptr<RequestContext> folly::EventBase::LoopCallback::context_
private

Definition at line 172 of file EventBase.h.

Referenced by folly::EventBase::runInLoop(), and folly::EventBase::runLoopCallbacks().


The documentation for this class was generated from the following file: