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 177 of file Synchronization.h.

◆ Mutex

using Mutex = boost::mutex

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

Definition at line 149 of file Synchronization.h.

◆ RecursiveMutex

using RecursiveMutex = boost::recursive_mutex

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

Definition at line 159 of file Synchronization.h.

◆ ScopedLock [1/2]

using ScopedLock = boost::unique_lock<HiddenTimedMutex>

Definition at line 139 of file Synchronization.h.

◆ ScopedLock [2/2]

using ScopedLock = Mutex::scoped_lock

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

Definition at line 150 of file Synchronization.h.

◆ ScopedLockPtr

using ScopedLockPtr = std::shared_ptr<ScopedLock>

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

Definition at line 151 of file Synchronization.h.

◆ ScopedRecursiveLock

using ScopedRecursiveLock = RecursiveMutex::scoped_lock

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

Definition at line 160 of file Synchronization.h.

◆ ScopedRecursiveLockPtr

using ScopedRecursiveLockPtr = std::shared_ptr<ScopedRecursiveLock>

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

Definition at line 161 of file Synchronization.h.

◆ ScopedRecursiveTryLock

using ScopedRecursiveTryLock = RecursiveMutex::scoped_try_lock

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

Definition at line 162 of file Synchronization.h.

◆ ScopedSharedLock

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

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

Definition at line 172 of file Synchronization.h.

◆ ScopedSharedLockPtr

using ScopedSharedLockPtr = std::shared_ptr<ScopedSharedLock>

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

Definition at line 175 of file Synchronization.h.

◆ ScopedTimedMutex

using ScopedTimedMutex = TimedMutex::scoped_lock

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

Definition at line 155 of file Synchronization.h.

◆ ScopedTimedMutexPtr

using ScopedTimedMutexPtr = std::shared_ptr<ScopedTimedMutex>

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

Definition at line 156 of file Synchronization.h.

◆ ScopedTimedRecursiveLock

using ScopedTimedRecursiveLock = TimedRecursiveMutex::scoped_lock

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

Definition at line 165 of file Synchronization.h.

◆ ScopedTimedRecursiveLockPtr

◆ ScopedTimedRecursiveTryLock

using ScopedTimedRecursiveTryLock = TimedRecursiveMutex::scoped_try_lock

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

Definition at line 167 of file Synchronization.h.

◆ ScopedTimedTryMutex

using ScopedTimedTryMutex = TimedMutex::scoped_try_lock

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

Definition at line 157 of file Synchronization.h.

◆ ScopedTryLock [1/2]

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

Definition at line 140 of file Synchronization.h.

◆ ScopedTryLock [2/2]

using ScopedTryLock = Mutex::scoped_try_lock

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

Definition at line 152 of file Synchronization.h.

◆ ScopedUniqueLock

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

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

Definition at line 171 of file Synchronization.h.

◆ ScopedUniqueLockPtr

using ScopedUniqueLockPtr = std::shared_ptr<ScopedUniqueLock>

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

Definition at line 174 of file Synchronization.h.

◆ SharedMutex

using SharedMutex = boost::shared_mutex

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

Definition at line 169 of file Synchronization.h.

◆ TimedMutex

using TimedMutex = boost::timed_mutex

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

Definition at line 154 of file Synchronization.h.

◆ TimedRecursiveMutex

using TimedRecursiveMutex = boost::recursive_timed_mutex

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

Definition at line 164 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 95 of file Synchronization.h.

◆ lock()

void lock ( )
inline

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

Definition at line 116 of file Synchronization.h.

◆ try_lock()

bool try_lock ( )
inline

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

Definition at line 128 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 134 of file Synchronization.h.

+ Here is the caller graph for this function:

◆ ~HiddenTimedMutex()

~HiddenTimedMutex ( )
inline

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

Definition at line 100 of file Synchronization.h.

+ Here is the call graph for this function: