uvw 3.1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
uvw::mutex Class Referencefinal

The mutex wrapper. More...

#include <thread.h>

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 try_lock () noexcept
 Tries to lock the mutex.
 
void unlock () noexcept
 Unlocks the mutex.
 
- Public Member Functions inherited from uvw::uv_type< uv_mutex_t >
virtual int init ()
 Initializes the handle.
 
loopparent () const noexcept
 Gets the loop from which the resource was originated.
 
const uv_mutex_t * raw () const noexcept
 Gets the underlying raw data structure.
 
uv_mutex_t * raw () noexcept
 Gets the underlying raw data structure.
 

Detailed Description

The mutex wrapper.

To create a mutex through a loop, arguments follow:

Definition at line 183 of file thread.h.

Member Function Documentation

◆ try_lock()

bool uvw::mutex::try_lock ( )
noexcept

Tries to lock the mutex.

Returns
True in case of success, false otherwise.

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