#include <userver/engine/semaphore.hpp>
A replacement for std::shared_lock that accepts Deadline arguments.
Definition at line 209 of file semaphore.hpp.
Public Member Functions | |
SemaphoreLock (Semaphore &) | |
SemaphoreLock (Semaphore &, std::defer_lock_t) noexcept | |
SemaphoreLock (Semaphore &, std::try_to_lock_t) | |
SemaphoreLock (Semaphore &, std::adopt_lock_t) noexcept | |
template<typename Rep , typename Period > | |
SemaphoreLock (Semaphore &, std::chrono::duration< Rep, Period >) | |
template<typename Clock , typename Duration > | |
SemaphoreLock (Semaphore &, std::chrono::time_point< Clock, Duration >) | |
SemaphoreLock (Semaphore &, Deadline) | |
SemaphoreLock (const SemaphoreLock &)=delete | |
SemaphoreLock (SemaphoreLock &&) noexcept | |
SemaphoreLock & | operator= (const SemaphoreLock &)=delete |
SemaphoreLock & | operator= (SemaphoreLock &&) noexcept |
bool | OwnsLock () const noexcept |
operator bool () const noexcept | |
void | Lock () |
bool | TryLock () |
template<typename Rep , typename Period > | |
bool | TryLockFor (std::chrono::duration< Rep, Period >) |
template<typename Clock , typename Duration > | |
bool | TryLockUntil (std::chrono::time_point< Clock, Duration >) |
bool | TryLockUntil (Deadline) |
void | Unlock () |
void | Release () |
engine::SemaphoreLock::SemaphoreLock | ( | Semaphore & | sem, |
std::chrono::duration< Rep, Period > | duration ) |
Definition at line 275 of file semaphore.hpp.
engine::SemaphoreLock::SemaphoreLock | ( | Semaphore & | sem, |
std::chrono::time_point< Clock, Duration > | until ) |
Definition at line 280 of file semaphore.hpp.
|
inlineexplicitnoexcept |
Definition at line 233 of file semaphore.hpp.
bool engine::SemaphoreLock::TryLockFor | ( | std::chrono::duration< Rep, Period > | duration | ) |
Definition at line 285 of file semaphore.hpp.
bool engine::SemaphoreLock::TryLockUntil | ( | std::chrono::time_point< Clock, Duration > | until | ) |
Definition at line 290 of file semaphore.hpp.