PromiseBase (open)

The Promise object is as a placeholder for the value of a currently executing operation. It can be resolved with a value, or rejected with an exception. Only the first resolvement or rejection will be used, once resolved the promise keeps that value.

Within asynchronous functions, you can wait for the promise to be resolved with AWAIT promise, with returns the value the promise was resolved with, or throws the exception the promise was rejected with.

Syntax

LOADLIB "wh::promise.whlib";

OBJECTTYPE PromiseBase

Constructor

Variables

Properties

Functions