taskResult(Task) -- retrieve the value returned by a task
Synopsis
-
Function: taskResult
-
- Usage:
taskResult t
-
Inputs:
-
Outputs:
-
the value returned by the function provided to schedule(Function) when the task was started. taskResult(Task) will first wait for the task to finish if necessary. If the task is cancelled, an error will be signaled.
-
Consequences:
-
The field in t where the return value is stored is set to null, and the task is considered to have completely terminated. Attempting to fetch the return value a second time will signal an error.