|
Evo C++ Library v0.5.1
|
#include <evo/thread.h>
Read/Write Mutex for thread synchronization.
-pthread-lpthreadC/C++ -> Code Generation -> Runtime Library Public Types | |
| typedef SmartLock< MutexRW > | Lock |
| Write Lock object type, general Mutex interface (Mutex::Lock will also work) – see SmartLock. More... | |
| typedef SmartLockRead< MutexRW > | LockRead |
| Read Lock object type – see SmartLockRead. More... | |
| typedef SmartLock< MutexRW > | LockWrite |
| Write Lock object type – see SmartLock. More... | |
Public Member Functions | |
| MutexRW () | |
| Constructor. More... | |
| ~MutexRW () | |
| Destructor. More... | |
| void | lock () |
| Write-Lock mutex. More... | |
| void | lock_read () |
| Read-Lock mutex. More... | |
| bool | trylock () |
| Try to Write-Lock mutex without blocking. More... | |
| bool | trylock (ulong timeout_ms) |
| Try to Write-Lock mutex with a timeout. More... | |
| bool | trylock_read () |
| Try to Read-Lock mutex without blocking. More... | |
| void | unlock () |
| Write-Unlock mutex. More... | |
| void | unlock_read () |
| Read-Unlock mutex. More... | |
Write Lock object type, general Mutex interface (Mutex::Lock will also work) – see SmartLock.
| typedef SmartLockRead<MutexRW> LockRead |
Read Lock object type – see SmartLockRead.
|
inline |
Constructor.
|
inline |
Destructor.
|
inline |
|
inline |
Read-Lock mutex.
|
inline |
Try to Write-Lock mutex without blocking.
|
inline |
Try to Write-Lock mutex with a timeout.
| timeout_ms | Timeout in milliseconds |
|
inline |
Try to Read-Lock mutex without blocking.
|
inline |
Write-Unlock mutex.
|
inline |
Read-Unlock mutex.
1.8.13