A scoped lock for any capability-annotated mutex.
Declared in <folly/synchronization/ThreadAnnotations.h>
template<typename Mutex>
class AnnotatedLockGuard;
Scoped lock for any capability-annotated mutex. std::lock_guard cannot be used in its place because it lacks the scoped_lockable attribute, so the analyzer would not understand that the wrapped capability is held inside the scope. Templated so it works with AnnotatedMutex today and with any future capability-annotated mutex (e.g. an annotated folly::SharedMutex) without needing a parallel guard per type. Use CTAD: folly::AnnotatedLockGuard lock(myMutex);
| Name | Description |
|---|---|
AnnotatedLockGuard [constructor] | Constructors |
~AnnotatedLockGuard [destructor] | Releases the guarded mutex. |
operator= | Assignment operators |