Attempts to lock a pointer.
Declared in <folly/concurrency/memory/PrimaryPtr.h>
std::shared_ptr<T>
lock() const;
Returns null if pointer is not set or if join() was called or cleanup() work was started (even if the call to join() hasn't returned yet or the cleanup() work has not completed yet).
A shared pointer to the object, or null if unavailable.