Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
Stroika::Foundation::Execution::TimedLockGuard< MUTEX > Class Template Reference

#include <TimedLockGuard.h>

Public Member Functions

template<typename FAILURE_EXCEPTION = TimeOutException>
 TimedLockGuard (MUTEX &m, const Time::Duration &waitUpTo, const FAILURE_EXCEPTION &timeoutException=FAILURE_EXCEPTION{})
 

Detailed Description

template<typename MUTEX = timed_mutex>
class Stroika::Foundation::Execution::TimedLockGuard< MUTEX >

Like lock_guard, but only used on TIMED mutexes, and instead of unique_lock::try_lock() returning false or the CTOR just silently failing to lock, this throws a lock failure.

See also
also UniqueLock

Definition at line 23 of file TimedLockGuard.h.

Constructor & Destructor Documentation

◆ TimedLockGuard()

template<typename MUTEX >
template<typename FAILURE_EXCEPTION >
Stroika::Foundation::Execution::TimedLockGuard< MUTEX >::TimedLockGuard ( MUTEX &  m,
const Time::Duration waitUpTo,
const FAILURE_EXCEPTION &  timeoutException = FAILURE_EXCEPTION{} 
)
Note
if argument duration is <= 0, this always throws regardless if whether or not the mutex could be acquired.

Definition at line 14 of file TimedLockGuard.inl.


The documentation for this class was generated from the following files: