Loop callback that wraps a function without allocating.

Synopsis

Declared in <folly/io/async/EventBase.h>

class StackFunctionLoopCallback
    : public LoopCallback

Description

Like FunctionLoopCallback, but saves one allocation. Use with caution. The caller is responsible for maintaining the lifetime of this callback until after the point at which the contained function is called.

Base Classes

Name

Description

LoopCallback

A callback interface to use with runInLoop()

Member Functions

Name

Description

StackFunctionLoopCallback [constructor]

Constructs the callback from a function.

cancelLoopCallback

Cancels the callback so it will not run.

isLoopCallbackScheduled

Returns whether the callback is scheduled to run.

runLoopCallback [virtual]

Runs the wrapped function.

Created with MrDocs