11template <
typename M,
bool Shared>
38 return m->LockShared();
46 if (TryLockImpl(*
m)) {
56 return m->UnlockShared();
65 return m->UnlockOnShared(
e);
67 return m->UnlockOn(
e);
74 m->UnlockHereShared();
89 return static_cast<M*
>(
Ptr());
101 static bool TryLockImpl(
M&
m) {
103 return m.TryLockShared();
void * ReleaseState() noexcept
bool Owns() const noexcept
void * UnlockState() noexcept
void * LockState() noexcept
Guard & operator=(Guard &&other) noexcept
Guard(M &m, std::try_to_lock_t) noexcept
auto UnlockOn(IExecutor &e) noexcept
bool OwnsLock() const noexcept
void UnlockHere() noexcept
Guard(M &m, std::defer_lock_t) noexcept
Guard(M &m, std::adopt_lock_t) noexcept
void Swap(Guard &other) noexcept
M * Mutex() const noexcept
Contract< V, E > MakeContract()
Creates related future and promise.