Creates an instance of the class
Name to use when logging about this variable
Milliseconds to wait before verifying if the promise was settled (resolved or rejected); will reject if it has not settled by that time. Use -1 if you do not want a timeout at all. Defaults to 10000 ms
A simple way to see if this variable's promise was resolved or rejected already
Whether the variable was already resolved or rejected
Get this variable's promise to a value. This always returns the same promise even after the value has been resolved or rejected.
The promise for the value to be set
Reject this variable's promise for the value with the given reason
This variable's promise will be rejected with this reason
Determines whether to throw if the variable was already resolved
or rejected. Defaults to false
Resolve this variable's promise to the given value
This variable's promise will resolve to this value
Determines whether to throw if the variable was already resolved
or rejected. Defaults to false
This class provides a convenient way for one task to wait on a variable that another task sets.