The OpenD Programming Language

Reader.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.

  1. bool tryLock()
  2. bool tryLock()
    class Reader
    @trusted shared
    bool
    tryLock
    ()
  3. bool tryLock(Duration timeout)
  4. bool tryLock(Duration timeout)

Return Value

Type: bool

true if the lock was acquired and false if not.

Meta