interface Future (View source)

Futures are returns from asynchronous methods.

Methods

mixed
get(int|float|null $timeout)

Waits for a given future resource to resolve and throws errors if any.

Details

mixed get(int|float|null $timeout)

Waits for a given future resource to resolve and throws errors if any.

Parameters

int|float|null $timeout

A timeout in seconds

Return Value

mixed

a value that the future has been resolved with

Exceptions

TimeoutException
InvalidArgumentException