folly::getCurrentAsyncStackRoot

Get access to the current thread's top-most AsyncStackRoot.

Synopsis

Declared in <folly/tracing/AsyncStack.h>

[[nodiscard]]
AsyncStackRoot&
getCurrentAsyncStackRoot() noexcept;

Description

Assumes that there is a current AsyncStackRoot.

Return Value

Reference to the current thread's top-most stack root.

NOTE

The return value should not be discarded.