uvw  2.1.0
Public Member Functions | List of all members
uvw::Mutex Class Referencefinal

The Mutex wrapper. More...

#include <thread.hpp>

Inheritance diagram for uvw::Mutex:
Inheritance graph
[legend]
Collaboration diagram for uvw::Mutex:
Collaboration graph
[legend]

Public Member Functions

void lock () noexcept
 Locks the mutex.
 
bool tryLock () noexcept
 Tries to lock the mutex. More...
 
void unlock () noexcept
 Unlocks the mutex.
 
- Public Member Functions inherited from uvw::UnderlyingType< Mutex, uv_mutex_t >
Looploop () const noexcept
 Gets the loop from which the resource was originated. More...
 
const uv_mutex_t * raw () const noexcept
 Gets the underlying raw data structure. More...
 
uv_mutex_t * raw () noexcept
 Gets the underlying raw data structure. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from uvw::UnderlyingType< Mutex, uv_mutex_t >
static std::shared_ptr< Mutexcreate (Args &&... args)
 Creates a new resource of the given type. More...
 

Detailed Description

The Mutex wrapper.

To create a Mutex through a Loop, arguments follow:

Definition at line 210 of file thread.hpp.

Member Function Documentation

◆ tryLock()

bool uvw::Mutex::tryLock ( )
inlinenoexcept

Tries to lock the mutex.

Returns
True in case of success, false otherwise.

Definition at line 239 of file thread.hpp.


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