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

Prev:?promise ( promise -- result )


Vocabulary
concurrency.promises

Inputs and outputs
promisea promise
timeouta duration or f
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