Evo C++ Library v0.5.1
Public Types | Public Member Functions | Public Attributes | List of all members
Mutex Struct Reference

#include <evo/thread.h>

Inheritance diagram for Mutex:
Inheritance graph
[legend]

Detailed Description

Mutex for thread synchronization.

Public Types

typedef pthread_mutex_t Handle
 Mutex handle type. More...
 
typedef SmartLock< MutexLock
 Lock object type – see SmartLock. More...
 

Public Member Functions

 Mutex ()
 Constructor. More...
 
void lock ()
 Lock mutex. More...
 
bool trylock ()
 Try to lock mutex without blocking. More...
 
bool trylock (ulong timeout_ms)
 Try to lock mutex with a timeout. More...
 
void unlock ()
 Unlock mutex. More...
 

Public Attributes

Handle handle
 Mutex handle – do not modify. More...
 

Member Typedef Documentation

◆ Lock

typedef SmartLock<Mutex> Lock

Lock object type – see SmartLock.

Constructor & Destructor Documentation

◆ Mutex()

Mutex ( )
inline

Constructor.


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