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. More...

Classes

struct  MutexTimeoutException
 The MutexTimeoutException struct. More...
 
class  PeriodicTask
 
class  RunningTask
 

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

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 159 of file Synchronization.h.

◆ Mutex

using Mutex = boost::mutex

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 131 of file Synchronization.h.

◆ RecursiveMutex

using RecursiveMutex = boost::recursive_mutex

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 141 of file Synchronization.h.

◆ ScopedLock [1/2]

using ScopedLock = boost::unique_lock<HiddenTimedMutex>

Definition at line 122 of file Synchronization.h.

◆ ScopedLock [2/2]

using ScopedLock = Mutex::scoped_lock

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 132 of file Synchronization.h.

◆ ScopedLockPtr

using ScopedLockPtr = std::shared_ptr<ScopedLock>

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 133 of file Synchronization.h.

◆ ScopedRecursiveLock

using ScopedRecursiveLock = RecursiveMutex::scoped_lock

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 142 of file Synchronization.h.

◆ ScopedRecursiveLockPtr

using ScopedRecursiveLockPtr = std::shared_ptr<ScopedRecursiveLock>

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 143 of file Synchronization.h.

◆ ScopedRecursiveTryLock

using ScopedRecursiveTryLock = RecursiveMutex::scoped_try_lock

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 144 of file Synchronization.h.

◆ ScopedSharedLock

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

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 154 of file Synchronization.h.

◆ ScopedSharedLockPtr

using ScopedSharedLockPtr = std::shared_ptr<ScopedSharedLock >

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 157 of file Synchronization.h.

◆ ScopedTimedMutex

using ScopedTimedMutex = TimedMutex::scoped_lock

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 137 of file Synchronization.h.

◆ ScopedTimedMutexPtr

using ScopedTimedMutexPtr = std::shared_ptr<ScopedTimedMutex>

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 138 of file Synchronization.h.

◆ ScopedTimedRecursiveLock

using ScopedTimedRecursiveLock = TimedRecursiveMutex::scoped_lock

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 147 of file Synchronization.h.

◆ ScopedTimedRecursiveLockPtr

◆ ScopedTimedRecursiveTryLock

using ScopedTimedRecursiveTryLock = TimedRecursiveMutex::scoped_try_lock

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 149 of file Synchronization.h.

◆ ScopedTimedTryMutex

using ScopedTimedTryMutex = TimedMutex::scoped_try_lock

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 139 of file Synchronization.h.

◆ ScopedTryLock [1/2]

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

Definition at line 123 of file Synchronization.h.

◆ ScopedTryLock [2/2]

using ScopedTryLock = Mutex::scoped_try_lock

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 134 of file Synchronization.h.

◆ ScopedUniqueLock

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

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 153 of file Synchronization.h.

◆ ScopedUniqueLockPtr

using ScopedUniqueLockPtr = std::shared_ptr<ScopedUniqueLock>

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 156 of file Synchronization.h.

◆ SharedMutex

using SharedMutex = boost::shared_mutex

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 151 of file Synchronization.h.

◆ TimedMutex

using TimedMutex = boost::timed_mutex

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 136 of file Synchronization.h.

◆ TimedRecursiveMutex

using TimedRecursiveMutex = boost::recursive_timed_mutex

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 146 of file Synchronization.h.

Function Documentation

◆ HiddenTimedMutex()

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

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 87 of file Synchronization.h.

◆ lock()

void lock ( )
inline

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 101 of file Synchronization.h.

◆ try_lock()

bool try_lock ( )
inline

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 112 of file Synchronization.h.

+ Here is the caller graph for this function:

◆ unlock()

void unlock ( )
inline

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 117 of file Synchronization.h.

+ Here is the caller graph for this function:

◆ ~HiddenTimedMutex()

~HiddenTimedMutex ( )
inline

#include <ArmarXCore/core/system/Synchronization.h>

Definition at line 88 of file Synchronization.h.

+ Here is the call graph for this function: