?promise-timeout ( promise timeout -- result )
Promises

Prev:?promise ( promise -- result )


Vocabulary
concurrency.promises

Inputs
promisea promise
timeouta duration or f


Outputs
resultan object


Word description
Waits for another thread to fulfill a promise, returning immediately if the promise has already been fulfilled. A timeout of f indicates that the thread may block indefinitely, otherwise it will wait up to the timeout before throwing an error.

Errors
Throws an error if the timeout expires before the promise has been fulfilled.

Definition