A TLObserver that optimizes for getting a shared_ptr-like pointer to data.
Declared in <folly/observer/ReadMostlyTLObserver.h>
template<typename T>
class ReadMostlyTLObserver;
| Name | Description |
|---|---|
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. |
| Name | Description |
|---|---|
makeReadMostlyTLObserver | Same as makeObserver(...), but creates ReadMostlyTLObserver. |