The OpenD Programming Language

ReadWriteMutex.Reader

This class can be considered a mutex in its own right, and is used to negotiate a read lock for the enclosing mutex.

Constructors

this
this()

Initializes a read/write mutex reader proxy object.

Members

Functions

lock
void lock()

Acquires a read lock on the enclosing mutex.

tryLock
bool tryLock()

Attempts to acquire a read lock on the enclosing mutex. If one can be obtained without blocking, the lock is acquired and true is returned. If not, the lock is not acquired and false is returned.

tryLock
bool tryLock(Duration timeout)

Attempts to acquire a read lock on the enclosing mutex. If one can be obtained without blocking, the lock is acquired and true is returned. If not, the function blocks until either the lock can be obtained or the time elapsed exceeds timeout, returning true if the lock was acquired and false if the function timed out.

tryLock
bool tryLock()

Attempts to acquire a read lock on the enclosing mutex. If one can be obtained without blocking, the lock is acquired and true is returned. If not, the lock is not acquired and false is returned.

tryLock
bool tryLock(Duration timeout)

Attempts to acquire a read lock on the enclosing mutex. If one can be obtained without blocking, the lock is acquired and true is returned. If not, the function blocks until either the lock can be obtained or the time elapsed exceeds timeout, returning true if the lock was acquired and false if the function timed out.

unlock
void unlock()

Releases a read lock on the enclosing mutex.

Meta