Executors.submit

Submits a Runnable task for execution and returns a Future representing that task. The Future's {@code get} method will return the given result upon successful completion.

@param task the task to submit @param result the result to return @param (T) the type of the result @return a Future representing pending completion of the task @throws RejectedExecutionException if the task cannot be scheduled for execution @throws NullPointerException if the task is null

  1. Future!(void) submit(ExecutorService es, Runnable task)
  2. Future!(T) submit(ExecutorService es, Runnable task, T result)
    class Executors
    static
    Future!(T)
    submit
    (
    T
    )
  3. Future!(T) submit(ExecutorService es, Callable!(T) task)

Meta