Call to set the waitable's value.
Calling setSuccess with an undefined value marks the waitable as no longer busy but still incomplete. To rerun the primary function,
reset must be used.
Calling setSuccess more than once and/or after a setFailure call is allowed and will make the waitable successful with the
specified value. This also triggers handlers for the isComplete binding, even if isComplete is already true.
Determines if the waitable was reset after the setSuccess or setFailure were created. If it was reset, calls to these functions
will be ignored. However, proactively checking can help some asynchronous functions avoid unnecessary work, even if they're already
partially complete.
Call to set the waitable's error.
Calling
setFailuremore than once and/or after asetSuccesscall is allowed and will make the waitable fail with the specified error. This also triggers handlers for theisCompletebinding, even ifisCompleteis alreadytrue.