folly::SynchronizedPtrLockedElement

Holds a lock together with access to the element it protects.

Synopsis

Declared in <folly/SynchronizedPtr.h>

template<
    typename LockHolder,
    typename Element>
struct SynchronizedPtrLockedElement;

Member Functions

NameDescription
SynchronizedPtrLockedElement [constructor]Construct from a lock holder, taking ownership of the lock.
operator* Return a reference to the locked element.
operator-> Provide member access to the locked element.
operator bool Test whether the underlying pointer is non-null.