Class: ConditionVariable

qui.base.ConditionVariable()

An asynchronous implementation of condition variables based on promises. Due to the fact that promises cannot be easily extended, this class actually wraps a promise.

Constructor

new ConditionVariable()

Source:

Extends

  • Promise

Methods

cancel(erroropt)

Cancel the condition, notifying everybody that waits on this condition.

Parameters:
Name Type Attributes Description
error * <optional>

an optional error argument

Source:

fulfill(argopt)

Fulfill the condition, notifying everybody that waits on this condition.

Parameters:
Name Type Attributes Description
arg * <optional>

an optional fulfill argument

Source:

isCancelled() → {Boolean}

Tell if the condition is cancelled or not.

Source:
Returns:
Type
Boolean

isFulfilled() → {Boolean}

Tell if the condition is fulfilled or not.

Source:
Returns:
Type
Boolean

isSettled() → {Boolean}

Tell if the condition is settled (fulfilled or cancelled) or not.

Source:
Returns:
Type
Boolean