The OpenD Programming Language

ReadWriteMutex.Writer

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

Constructors

this
this()

Initializes a read/write mutex writer proxy object.

Members

Functions

lock
void lock()

Acquires a write lock on the enclosing mutex.

tryLock
bool tryLock()

Attempts to acquire a write 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 write 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 write 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 write 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 write lock on the enclosing mutex.

Meta