uvw 2.12.1
Loading...
Searching...
No Matches
uvw::RWLock Class Referencefinal

The RWLock wrapper. More...

#include <thread.h>

Inheritance diagram for uvw::RWLock:
Collaboration diagram for uvw::RWLock:

Public Member Functions

void rdLock () noexcept
 Locks a read-write lock object for reading.
 
bool tryRdLock () 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 tryWrLock () 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::UnderlyingType< RWLock, uv_rwlock_t >
Looploop () 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.
 

Additional Inherited Members

- Static Public Member Functions inherited from uvw::UnderlyingType< RWLock, uv_rwlock_t >
static std::shared_ptr< RWLockcreate (Args &&...args)
 Creates a new resource of the given type.
 
- Protected Member Functions inherited from uvw::UnderlyingType< RWLock, uv_rwlock_t >

Detailed Description

The RWLock wrapper.

Definition at line 203 of file thread.h.

Member Function Documentation

◆ tryRdLock()

bool uvw::RWLock::tryRdLock ( )
noexcept

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

Returns
True in case of success, false otherwise.

◆ tryWrLock()

bool uvw::RWLock::tryWrLock ( )
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: