mn::basic_timed_lock< TLOCK > Class Template Reference

#include <mn_timed_lock.hpp>

Public Member Functions

 basic_timed_lock ()
 
 ~basic_timed_lock ()
 
void lock (basic_convar_task &task, unsigned int timeout=MN_THREAD_CONFIG_TIMEOUT_MUTEX_DEFAULT)
 
void unlock (bool signal_childs=true)
 

Private Attributes

convar_t m_cv
 
TLOCK m_lockObject
 
bool m_bLocked
 

Constructor & Destructor Documentation

◆ basic_timed_lock()

template<class TLOCK >
mn::basic_timed_lock< TLOCK >::basic_timed_lock ( )
inline

Construtor

◆ ~basic_timed_lock()

template<class TLOCK >
mn::basic_timed_lock< TLOCK >::~basic_timed_lock ( )
inline

Deconstrutor

Member Function Documentation

◆ lock()

template<class TLOCK >
void mn::basic_timed_lock< TLOCK >::lock ( basic_convar_task &  task,
unsigned int  timeout = MN_THREAD_CONFIG_TIMEOUT_MUTEX_DEFAULT 
)
inline

Lock the timed mutex.

Parameters
taskThe current canvar Task
TimeoutHow long to wait to get the Lock until giving up. (default = 0xffffffffUL)

◆ unlock()

template<class TLOCK >
void mn::basic_timed_lock< TLOCK >::unlock ( bool  signal_childs = true)
inline

Unlock the timed Mutex.

Parameters
signal_childsOn notify the task, send a notify to the child task?

Member Data Documentation

◆ m_bLocked

template<class TLOCK >
bool mn::basic_timed_lock< TLOCK >::m_bLocked
private

◆ m_cv

template<class TLOCK >
convar_t mn::basic_timed_lock< TLOCK >::m_cv
private

◆ m_lockObject

template<class TLOCK >
TLOCK mn::basic_timed_lock< TLOCK >::m_lockObject
private

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