| Return type | Method name |
| TResult | await(Task< TResult > task ) throws ExecutionException, InterruptedException Blocks until the specified task is completed. |
| TResult | await(Task< TResult > task,long timeout, TimeUnit unit) throws ExecutionException, InterruptedException Blocks until the specified task is completed. |
| Task< TResult > | call(final Callable< TResult > callable) Returns a task based on the result of the specified Callable. The Callable will be called on the main thread. |
| Method |
public static < TResult > TResult await(Task< TResult > task) throws ExecutionException, InterruptedException |
| Blocks until the specified task is completed. |
Parameters
| Parameter name | Parameter desc |
| task | Task to be completed. |
| Parameter name | Parameter desc |
| ExecutionException | Task fails. |
| InterruptedException | An interrupt occurs while waiting for the task to complete. |
| type | desc |
| TResult | Result of the task. |
| Method |
public static < TResult > TResult await(Task< TResult > task,long timeout, TimeUnit unit) throws ExecutionException, InterruptedException |
| Blocks until the specified task is completed. |
Parameters
| Parameter name | Parameter desc |
| task | Task to be completed. |
| timeout | Timeout duration. |
| unit | Unit of time. |
| Parameter name | Parameter desc |
| ExecutionException | Task fails. |
| InterruptedException | An interrupt occurs while waiting for the task to complete. |
| type | desc |
| TResult | Result of the task. |
| Method |
public static < TResult > Task< TResult > call(final Callable callable) |
| Returns a task based on the result of the specified Callable. The Callable will be called on the main thread. |
Parameters
| Parameter name | Parameter desc |
| task | Operation to be performed. |
| type | desc |
| TResult | New task returned. |