Honeycomb
0.1
Component-Model Framework
|
A thread lock where the lock is acquired by suspending thread execution until it becomes available. More...
#include <Mutex.h>
Public Types | |
typedef Super::Handle | Handle |
typedef UniqueLock< Mutex > | Scoped |
Public Member Functions | |
Mutex ()=default | |
Mutex (const Mutex &) | |
Can't copy, silently inits to default. More... | |
Mutex & | operator= (const Mutex &) |
Can't copy, silently does nothing. More... | |
void | lock () |
Acquire the lock. Thread suspends until lock becomes available. More... | |
void | unlock () |
Release the lock. More... | |
bool | tryLock () |
Attempt to acquire the lock, returns immediately. Returns true if the lock was acquired, false otherwise. More... | |
Handle & | handle () |
Get platform handle. More... | |
A thread lock where the lock is acquired by suspending thread execution until it becomes available.
Use when threads are expected to acquire the lock for a long time before releasing.
The lock is non-recursive: a thread can only acquire the lock once, a second attempt without unlocking first will deadlock.
typedef Super::Handle honey::Mutex::Handle |
typedef UniqueLock<Mutex> honey::Mutex::Scoped |
|
default |
|
inline |
Can't copy, silently inits to default.
|
inline |
Get platform handle.
|
inline |
Acquire the lock. Thread suspends until lock becomes available.
|
inline |
Attempt to acquire the lock, returns immediately. Returns true if the lock was acquired, false otherwise.
|
inline |
Release the lock.