Constructor.
Maximum number of unresolved promises before the createPromise function throws.
The default timeout for newly created promises.
Get the number of pending promises.
Add a new promise.
Note that this function will throw synchronous when the number of pending promises has been exceeded (>= maxPendingPromiseCount).
Optional
timeout: numberTimeout as unsigned 32-bit integer or Number.POSITIVE_INFINITY. If undefined use the default value passed to the constructor.
Reject all promises.
argument with which to reject the promises.
Reject the promise that was added first.
argument with which to reject the promise.
Reject the promise that was added last.
argument with which to reject the promise.
Resolve all promises.
argument with which to resolve the promises.
Resolve the promise that was added first.
argument with which to resolve the promise.
Resolve the promise that was added last.
argument with which to resolve the promise.
This class can spawn multiple promises and you can resolve / reject multiple ones at the same time.