LocalMutex | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Class LocalMutex

    A mutex which is only visible in the current JavaScript VM

    const mutex = new LocalMutex;

    using lock = await mutex.lock();
    lock.release();

    // If you'll be relying on automatic release
    using lock = await mutex.lock();
    void(lock);
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Returns void

    • Lock this mutex

      Returns Promise<LocalLock>

      Lock object. Use with using to ensure automatic unlock