folly::shared_mutex_detail::ThreadIdOwnershipTracker

Ownership tracker that records the id of the owning thread.

Synopsis

Declared in <folly/SharedMutex.h>

class ThreadIdOwnershipTracker;

Description

Used when the policy requests thread-id tracking; stores the OS thread id while the lock is held in upgrade or exclusive mode.

Member Functions

NameDescription
beginThreadOwnership Records the current thread as the owner.
endThreadOwnership Clears the recorded owning thread.
maybeBeginThreadOwnership Records the current thread as the owner when ownership is taken.