The HiddenTimedMutex class is a mutex, that has a normal boost::mutex interface, but will timeout after fixed (defined in MUTEX_TIMEOUT_MSEC) interval and throw a MutexTimeoutException, if it could not aquire the mutex in that time. More...

Classes

struct  MutexTimeoutException
 The MutexTimeoutException struct. More...
 
class  PeriodicTask< T >
 The periodic task executes one thread method repeatedly using the time period specified in the constructor. More...
 
class  RunningTask< T >
 

Typedefs

using ConditionalVariable = boost::condition_variable
 
using Mutex = boost::mutex
 
using RecursiveMutex = boost::recursive_mutex
 
using ScopedLock = boost::unique_lock<HiddenTimedMutex>
 
using ScopedLock = Mutex::scoped_lock
 
using ScopedLockPtr = std::shared_ptr<ScopedLock>
 
using ScopedRecursiveLock = RecursiveMutex::scoped_lock
 
using ScopedRecursiveLockPtr = std::shared_ptr<ScopedRecursiveLock>
 
using ScopedRecursiveTryLock = RecursiveMutex::scoped_try_lock
 
using ScopedSharedLock = boost::shared_lock<boost::shared_mutex>
 
using ScopedSharedLockPtr = std::shared_ptr<ScopedSharedLock>
 
using ScopedTimedMutex = TimedMutex::scoped_lock
 
using ScopedTimedMutexPtr = std::shared_ptr<ScopedTimedMutex>
 
using ScopedTimedRecursiveLock = TimedRecursiveMutex::scoped_lock
 
using ScopedTimedRecursiveLockPtr = std::shared_ptr<ScopedTimedRecursiveLock>
 
using ScopedTimedRecursiveTryLock = TimedRecursiveMutex::scoped_try_lock
 
using ScopedTimedTryMutex = TimedMutex::scoped_try_lock
 
using ScopedTryLock = boost::detail::try_lock_wrapper<HiddenTimedMutex>
 
using ScopedTryLock = Mutex::scoped_try_lock
 
using ScopedUniqueLock = boost::unique_lock<boost::shared_mutex>
 
using ScopedUniqueLockPtr = std::shared_ptr<ScopedUniqueLock>
 
using SharedMutex = boost::shared_mutex
 
using TimedMutex = boost::timed_mutex
 
using TimedRecursiveMutex = boost::recursive_timed_mutex
 

Functions

 HiddenTimedMutex (int timeout=MUTEX_TIMEOUT_MSEC, std::string mutexName="")
 
void lock ()
 
bool try_lock ()
 
void unlock ()
 
 ~HiddenTimedMutex ()
 

Detailed Description

The HiddenTimedMutex class is a mutex, that has a normal boost::mutex interface, but will timeout after fixed (defined in MUTEX_TIMEOUT_MSEC) interval and throw a MutexTimeoutException, if it could not aquire the mutex in that time.


This way, the stacktrace to the deadlock can be easily retrieved.

Typedef Documentation

◆ ConditionalVariable

using ConditionalVariable = boost::condition_variable

◆ Mutex

using Mutex = boost::mutex

◆ RecursiveMutex

using RecursiveMutex = boost::recursive_mutex

◆ ScopedLock [1/2]

using ScopedLock = boost::unique_lock<HiddenTimedMutex>

◆ ScopedLock [2/2]

using ScopedLock = Mutex::scoped_lock

◆ ScopedLockPtr

◆ ScopedRecursiveLock

using ScopedRecursiveLock = RecursiveMutex::scoped_lock

◆ ScopedRecursiveLockPtr

◆ ScopedRecursiveTryLock

using ScopedRecursiveTryLock = RecursiveMutex::scoped_try_lock

◆ ScopedSharedLock

using ScopedSharedLock = boost::shared_lock<boost::shared_mutex>

◆ ScopedSharedLockPtr

◆ ScopedTimedMutex

using ScopedTimedMutex = TimedMutex::scoped_lock

◆ ScopedTimedMutexPtr

◆ ScopedTimedRecursiveLock

using ScopedTimedRecursiveLock = TimedRecursiveMutex::scoped_lock

◆ ScopedTimedRecursiveLockPtr

◆ ScopedTimedRecursiveTryLock

using ScopedTimedRecursiveTryLock = TimedRecursiveMutex::scoped_try_lock

◆ ScopedTimedTryMutex

using ScopedTimedTryMutex = TimedMutex::scoped_try_lock

◆ ScopedTryLock [1/2]

using ScopedTryLock = boost::detail::try_lock_wrapper<HiddenTimedMutex>

◆ ScopedTryLock [2/2]

using ScopedTryLock = Mutex::scoped_try_lock

◆ ScopedUniqueLock

using ScopedUniqueLock = boost::unique_lock<boost::shared_mutex>

◆ ScopedUniqueLockPtr

◆ SharedMutex

using SharedMutex = boost::shared_mutex

◆ TimedMutex

using TimedMutex = boost::timed_mutex

◆ TimedRecursiveMutex

using TimedRecursiveMutex = boost::recursive_timed_mutex

Function Documentation

◆ HiddenTimedMutex()

HiddenTimedMutex ( int timeout = MUTEX_TIMEOUT_MSEC,
std::string mutexName = "" )
inline

◆ lock()

void lock ( )
inline

◆ try_lock()

bool try_lock ( )
inline

◆ unlock()

void unlock ( )
inline

◆ ~HiddenTimedMutex()