commore  1.0.6-SNAPSHOT
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
commore::TryLock Class Reference

#include <CriticalSection.h>

Public Member Functions

 TryLock (CriticalSection &spcs)
 
 TryLock (CriticalSection *spcs)
 
 TryLock (Mutex &mtx)
 
 TryLock (Mutex *mtx)
 
 ~TryLock ()
 
bool entered () const
 
 operator bool () const
 

Detailed Description

Impatient Gardian of block Simple and Secure CriticalSection or Mutex blocker Try set Lock in constructor and released by destructor. Does not wait lock is set.

Constructor & Destructor Documentation

commore::TryLock::TryLock ( CriticalSection spcs)
inline

Try Lock a critical section by reference

Parameters
spcs
commore::TryLock::TryLock ( CriticalSection spcs)
inline

Try Lock a critical section by pointer

Parameters
spcs
commore::TryLock::TryLock ( Mutex mtx)
inline

Try Lock a mutex by reference

Parameters
mtx
commore::TryLock::TryLock ( Mutex mtx)
inline

Try Lock a mutex by pointer

Parameters
mtx
commore::TryLock::~TryLock ( )
inline

Release lock if set

Member Function Documentation

bool commore::TryLock::entered ( ) const
inline
Returns
true if lock is set
commore::TryLock::operator bool ( ) const
inline
Returns
true if lock is set

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