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

The rwlock wrapper. More...

#include <thread.h>

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

Public Member Functions

void rdlock () noexcept
 Locks a read-write lock object for reading.
 
bool try_rdlock () noexcept
 Tries to lock a read-write lock object for reading.
 
void rdunlock () noexcept
 Unlocks a read-write lock object previously locked for reading.
 
void wrlock () noexcept
 Locks a read-write lock object for writing.
 
bool try_wrlock () noexcept
 Tries to lock a read-write lock object for writing.
 
void wrunlock () noexcept
 Unlocks a read-write lock object previously locked for writing.
 
- Public Member Functions inherited from uvw::uv_type< uv_rwlock_t >
virtual int init ()
 Initializes the handle.
 
loopparent () const noexcept
 Gets the loop from which the resource was originated.
 
const uv_rwlock_t * raw () const noexcept
 Gets the underlying raw data structure.
 
uv_rwlock_t * raw () noexcept
 Gets the underlying raw data structure.
 

Detailed Description

The rwlock wrapper.

Definition at line 211 of file thread.h.

Member Function Documentation

◆ try_rdlock()

bool uvw::rwlock::try_rdlock ( )
noexcept

Tries to lock a read-write lock object for reading.

Returns
True in case of success, false otherwise.

◆ try_wrlock()

bool uvw::rwlock::try_wrlock ( )
noexcept

Tries to lock a read-write lock object for writing.

Returns
True in case of success, false otherwise.

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