Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WAKMutexProxy

Hierarchy

  • WAKMutexProxy

Index

Methods

lock

  • lock(): Boolean
  • Locks the mutex or wait until it has been released to lock it; the thread execution is paused until then.

    var writeMutex = Mutex('writeMutex');
    writeMutex.lock();

    Returns Boolean

    Returns true if the mutex is locked

tryToLock

  • tryToLock(): Boolean
  • Tries to lock the mutex or returns false if it is already locked. The thread execution is not paused.

    var writeMutex = Mutex('writeMutex');
    writeMutex.tryToLock();

    Returns Boolean

    Returns true if the mutex is locked, false otherwise

unlock

  • unlock(): Boolean
  • Unlock the mutex. The mutex must be lock in the same thread to be unlock.

    var writeMutex = Mutex('writeMutex');
    writeMutex.lock();
    writeMutex.unlock();

    Returns Boolean

    Returns true if the mutex is unlocked, false otherwise