FRI-OS
|
Class optionally locking a mutex if it is free. More...
#include <frios/posix/threads/mutex.hpp>
Public Member Functions | |
try_lock (mutex &mutex) | |
Tries to lock the specified mutex throws if the mutex is locked. More... | |
Class optionally locking a mutex if it is free.
This class is similar to lock, but it locks the mutex only if it is not already locked. If it is locked the constructor of try_lock fails by throwing the locked exception.
Tries to lock the specified mutex throws if the mutex is locked.
locked | |
lock_error |