Public Member Functions | Private Attributes
icl_core::thread::ScopedMutexLock Class Reference

Manages locking and unlocking of a mutes. More...

#include <ScopedMutexLock.h>

Inheritance diagram for icl_core::thread::ScopedMutexLock:
Inheritance graph

List of all members.

Public Member Functions

bool isLocked () const
 operator bool () const
 ScopedMutexLock (Mutex &mutex, bool force=true)
 ~ScopedMutexLock ()

Private Attributes

bool m_is_locked

Detailed Description

Manages locking and unlocking of a mutes.

Locks or tries to lock a mutex in the constructor and unlocks it in the destructor.

Definition at line 50 of file ScopedMutexLock.h.

Constructor & Destructor Documentation

icl_core::thread::ScopedMutexLock::ScopedMutexLock ( Mutex mutex,
bool  force = true 
) [explicit]

Locks the mutex.

mutexThe mutex to use.
forceEnsure at all cost that IsLocked() is true.

Definition at line 30 of file ScopedMutexLock.cpp.

Unlocks the mutex.

Definition at line 40 of file ScopedMutexLock.cpp.

Member Function Documentation

Check if the mutex has been successfully locked.

Definition at line 64 of file ScopedMutexLock.h.

icl_core::thread::ScopedMutexLock::operator bool ( ) const [inline]

Implicit conversion to bool.

Definition at line 68 of file ScopedMutexLock.h.

Member Data Documentation

Definition at line 83 of file ScopedMutexLock.h.

Definition at line 82 of file ScopedMutexLock.h.

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

autogenerated on Thu Jun 6 2019 20:22:27