parallel\Future::value

(0.8.0)

parallel\Future::valueResolution

说明

public parallel\Future::value ( void ) : mixed

Shall resolve the future value, will wait until the value becomes available.

public parallel\Future::value ( int $timeout ) : mixed

Shall attempt to resolve the future value, will wait up to the given timeout.

参数

timeout

Timeout in microseconds

返回值

Shall return the future value

Exceptions

Warning

Shall throw \parallel\Exception if Closure was killed.

Warning

Shall throw \parallel\Exception if Runtime was closed before execution.

Warning

Shall throw \parallel\Exception if Runtime was killed during execution.

Warning

Shall throw \parallel\Exception if Closure suffered a fatal error or exception

Warning

Shall throw \parallel\Exception if timeout is negative

Warning

Shall throw \parallel\TimeoutException if timeout is reached