10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::concurrent::GuardWithTimeout< TIMED_MUTEX > Class Template Reference

#include <GuardWithTimeout.h>

Detailed Description

template<typename TIMED_MUTEX>
class tenduke::concurrent::GuardWithTimeout< TIMED_MUTEX >

A mutex-guard with timeout functionality.

Template Parameters
TIMED_MUTEXtype of the mutex

Public Member Functions

 GuardWithTimeout (TIMED_MUTEX &mutex, std::chrono::milliseconds timeout)
 Constructs new instance: Tries to lock the mutex.
 
bool hasTimedout () const
 Checks if the guard failed beaause of timeout.
 

Constructor & Destructor Documentation

◆ GuardWithTimeout()

template<typename TIMED_MUTEX >
tenduke::concurrent::GuardWithTimeout< TIMED_MUTEX >::GuardWithTimeout ( TIMED_MUTEX &  mutex,
std::chrono::milliseconds  timeout 
)
inline

Constructs new instance: Tries to lock the mutex.

Parameters
mutex-
timeout-

Member Function Documentation

◆ hasTimedout()

template<typename TIMED_MUTEX >
bool tenduke::concurrent::GuardWithTimeout< TIMED_MUTEX >::hasTimedout ( ) const
inline

Checks if the guard failed beaause of timeout.

Returns
-

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