folly::DCheckRequestContextRestoredGuard

Debug-only guard that checks the context is unchanged across a scope.

Synopsis

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

class [[maybe_unused]] DCheckRequestContextRestoredGuard;

NOTE

This entity may be unused, and the compiler will not warn about it.

Description

Ensures that the current request context at destruction is the same as the one at construction.

Member Functions

NameDescription
DCheckRequestContextRestoredGuard [constructor]Constructors
~DCheckRequestContextRestoredGuard [destructor]Checks the context matches the captured one and destroys the guard.
operator= Assignment operators