ARC SDK
Public Member Functions
Arc::TimedMutex Class Reference

Mutex which allows a timeout on locking. More...

#include <arc/Thread.h>

Public Member Functions

bool lock (int t=-1)
 Lock mutex, but wait no longer than t milliseconds. More...
 
bool trylock (void)
 Returns true if mutex is currently locked, but does not attempt to acquire lock. More...
 
bool unlock (void)
 Release mutex. More...
 
void forceReset (void)
 This method is meant to be used only after fork. More...
 

Detailed Description

Mutex which allows a timeout on locking.

Member Function Documentation

◆ forceReset()

void Arc::TimedMutex::forceReset ( void  )
inline

This method is meant to be used only after fork.

It resets state of all internal locks and variables.

◆ lock()

bool Arc::TimedMutex::lock ( int  t = -1)
inline

Lock mutex, but wait no longer than t milliseconds.

Returns
false if timeout occurred.

◆ trylock()

bool Arc::TimedMutex::trylock ( void  )
inline

Returns true if mutex is currently locked, but does not attempt to acquire lock.

◆ unlock()

bool Arc::TimedMutex::unlock ( void  )
inline

Release mutex.


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