API Documentation
Loading...
Searching...
No Matches
WLock Class Reference

Used to lock a particular variable for writing. Only one write lock can be created when no read locks are on a variable, otherwise will wait. More...

#include <RWLock.h>

Public Member Functions

bool isLocked () const
 
void operator= (const WLock &)=delete
 
 WLock (const UUID &lock)
 
 WLock (const void *lock)
 
 WLock (const void *lock, const TimeSpan &timeout)
 
 WLock (const void *lock, uint08 timeout)
 
 WLock (const WLock &)=delete
 
 WLock (RWLock &lock)
 
 WLock (WLock &&lock) noexcept
 
 ~WLock ()
 

Static Public Member Functions

static bool HasLock (const RWLock &lock)
 
static bool HasLock (const void *lock)
 

Detailed Description

Used to lock a particular variable for writing. Only one write lock can be created when no read locks are on a variable, otherwise will wait.


Note: Automatically unlocks on destruction.

Constructor & Destructor Documentation

◆ WLock() [1/7]

WLock ( const void * lock)
explicit

◆ WLock() [2/7]

WLock ( const UUID & lock)
explicit

◆ WLock() [3/7]

WLock ( RWLock & lock)
explicit

◆ WLock() [4/7]

WLock ( WLock && lock)
noexcept

◆ WLock() [5/7]

WLock ( const WLock & )
delete

◆ WLock() [6/7]

WLock ( const void * lock,
uint08 timeout )

◆ WLock() [7/7]

WLock ( const void * lock,
const TimeSpan & timeout )

◆ ~WLock()

~WLock ( )

Member Function Documentation

◆ HasLock() [1/2]

static bool HasLock ( const RWLock & lock)
static

◆ HasLock() [2/2]

static bool HasLock ( const void * lock)
static

◆ isLocked()

bool isLocked ( ) const

◆ operator=()

void operator= ( const WLock & )
delete

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