EpcTools
An event based multi-threaded C++ development framework.
Public Member Functions | List of all members
EWRLock Class Reference

Request a write lock for the specified read-write lock object. More...

#include <esynch.h>

Public Member Functions

 EWRLock (ERWLock &rwlock, Bool acq=true)
 Class constructor. More...
 
 ~EWRLock ()
 Class destructor. More...
 
Bool acquire (Bool wait=true)
 Acquires the lock. More...
 
Bool isLocked ()
 Retrieves the lock status. More...
 

Detailed Description

Request a write lock for the specified read-write lock object.

Constructor & Destructor Documentation

◆ EWRLock()

EWRLock::EWRLock ( ERWLock rwlock,
Bool  acq = true 
)
inline

Class constructor.

Parameters
rwlockthe read-write lock object to obtain the write lock for.
acqdirects the constructor to acquire the lock.

◆ ~EWRLock()

EWRLock::~EWRLock ( )
inline

Class destructor.

Member Function Documentation

◆ acquire()

Bool EWRLock::acquire ( Bool  wait = true)
inline

Acquires the lock.

Parameters
waitif True, this method will wait for the lock to be obtained.
Returns
True indicates that the lock was successfully acquired, otherwise False.

◆ isLocked()

Bool EWRLock::isLocked ( )
inline

Retrieves the lock status.

Returns
True indicates that the lock has been acquired, otherwise False.

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