AsyncConditionVariable Class

    Package: @esfx/async-conditionvariable
    Declaration
    export declare class AsyncConditionVariable 

    Methods

    notifyAll()

    Notifies all current waiters to reacquire their locks.

    Declaration
    notifyAll(): void;
    Returns
    void

    notifyOne()

    Notifies one waiter to reacquire its lock.

    Declaration
    notifyOne(): void;
    Returns
    void

    wait(lock, cancelable)

    Releases lock, waiting until notified before reacquiring lock.

    Declaration
    wait(lock: AsyncLockable, cancelable?: Cancelable): Promise<void>;
    Parameters
    lock
    AsyncLockable

    An AsyncLockable to release and reacquire.

    cancelable
    Cancelable

    A Cancelable object that can be used to cancel the request.

    Returns
    Promise<void>

    wait(lock, condition, cancelable)

    Releases lock, waiting until notified before reacquiring lock.

    Declaration
    wait(lock: AsyncLockable, condition?: () => boolean, cancelable?: Cancelable): Promise<void>;
    Parameters
    lock
    AsyncLockable

    An AsyncLockable to release and reacquire.

    condition
    () => boolean

    When specified, loops until condition returns true.

    cancelable
    Cancelable

    A Cancelable object that can be used to cancel the request.

    Returns
    Promise<void>

    Generated by DocFX