FRI-OS
Public Member Functions | List of all members
mutex::try_lock Struct Reference

Class optionally locking a mutex if it is free. More...

#include <frios/posix/threads/mutex.hpp>

Inheritance diagram for mutex::try_lock:
Inheritance graph
[legend]
Collaboration diagram for mutex::try_lock:
Collaboration graph
[legend]

Public Member Functions

 try_lock (mutex &mutex)
 Tries to lock the specified mutex throws if the mutex is locked. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

try_lock ( mutex mutex)

Tries to lock the specified mutex throws if the mutex is locked.

Exceptions
locked
lock_error

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