VEX V5 C++ API
Public Member Functions | List of all members
vex::mutex Class Reference

Use this class to create and control mutexes. More...

Public Member Functions

 mutex ()
 
 ~mutex ()
 
void lock ()
 Locks the mutex and blocks if the mutex is not available. More...
 
bool try_lock ()
 Try to lock the mutex and returns if the mutex is not available. More...
 
void unlock ()
 Unlocks the mutex. More...
 

Detailed Description

Use this class to create and control mutexes.

Constructor & Destructor Documentation

◆ mutex()

vex::mutex::mutex ( )

◆ ~mutex()

vex::mutex::~mutex ( )

Member Function Documentation

◆ lock()

void vex::mutex::lock ( )

Locks the mutex and blocks if the mutex is not available.

◆ try_lock()

bool vex::mutex::try_lock ( )

Try to lock the mutex and returns if the mutex is not available.

Returns
Returns true if successful and false if the mutex is owned by another thread.

◆ unlock()

void vex::mutex::unlock ( )

Unlocks the mutex.