CreatePromiseRace (open)
The race function returns a new promise which is settled in the same way as the first passed promise to settle.
Syntax
LOADLIB "wh::promise.whlib";
OBJECT FUNCTION CreatePromiseRace(OBJECT ARRAY promises, RECORD options)Parameters
OBJECT ARRAY promisesList of promises
RECORD optionsOptions
wrapIf TRUE, wrap resolved promises values in a record [ source := resolved promise, value := resolved value ]
Return value
OBJECTNew promise.