folly::observer::ReadMostlyTLObserver

A TLObserver that optimizes for getting a shared_ptr-like pointer to data.

Synopsis

Declared in <folly/observer/ReadMostlyTLObserver.h>

template<typename T>
class ReadMostlyTLObserver;

Member Functions

NameDescription
ReadMostlyTLObserver [constructor]Constructors
getShared Returns a thread-local shared pointer to the current observed value.
getUnderlyingObserver Returns the underlying observer being cached.
with Invoke a function with the current observed value. The snapshot is held alive for the duration of the call, preventing read-after-free when accessing members of the observed object.

Non-Member Functions

NameDescription
makeReadMostlyTLObserverSame as makeObserver(...), but creates ReadMostlyTLObserver.