Lunchbox  1.6.0
Public Member Functions
lunchbox::TimedLock Class Reference

A mutex with timeout capabilities. More...

#include <timedLock.h>

+ Inheritance diagram for lunchbox::TimedLock:
+ Collaboration diagram for lunchbox::TimedLock:

List of all members.

Public Member Functions

 TimedLock ()
 Construct a new timed lock.
 ~TimedLock ()
 Destruct the lock.
bool set (const uint32_t timeout=LB_TIMEOUT_INDEFINITE)
 Set the lock.
void unset ()
 Release the lock.
bool trySet ()
 Attempt to set the lock.
bool isSet ()
 Test if the lock is set.

Detailed Description

A mutex with timeout capabilities.

Definition at line 30 of file timedLock.h.


Constructor & Destructor Documentation

Construct a new timed lock.

Version:
1.0

Destruct the lock.

Version:
1.0

Member Function Documentation

Test if the lock is set.

Returns:
true if the lock is set, false if it is not set.
Version:
1.0
bool lunchbox::TimedLock::set ( const uint32_t  timeout = LB_TIMEOUT_INDEFINITE)

Set the lock.

Parameters:
timeoutthe timeout in milliseconds to wait for the lock, or LB_TIMEOUT_INDEFINITE to wait indefinitely.
Returns:
true if the lock was acquired, false if not.
Version:
1.0

Attempt to set the lock.

Returns:
true if the lock was acquired, false if not.
Version:
1.0

Release the lock.

Version:
1.0

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