Future<Object> submitWithResult(Runnable task, Object result)

Submits a Runnable task for background eution and returns a Future representing that task. The Future's get() method will return the given result upon successful completion.

Parameters

Name Description
task The task to submit.
result The result to return.

Return

A Future representing pending completion of the task.