CreatePromiseAllSettled (open)

The CreatePromiseAllSettled returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises have settled, i.e. become either fulfilled or rejected.

Syntax

LOADLIB "wh::promise.whlib";

OBJECT FUNCTION CreatePromiseAllSettled(OBJECT ARRAY promises)

Parameters

OBJECT ARRAY promises

List of promises

Return value

OBJECT

New promise

OBJECT reason

Rejection value (only if status is 'rejected')

status

Promise status: 'fulfilled' or 'rejected'

value

Fulfullment value (only if status is 'fulfilled')