Package: java.util.concurrent

## [Java] Interface ExecutorService

-     public interface ExecutorService

  GDK enhancements for ExecutorService.

  displayName:
    ExecutorService
  receiverFqcn:
    java.util.concurrent.ExecutorService

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `<T>` | `public Future<T>` | `submit(Closure<T> task)` Submits a value-returning task for execution and returns a Future representing the pending results of the task.

- - ### Method Detail

    - #### <T> public Future<T> submit(Closure<T> task)

      Submits a value-returning task for execution and returns a Future representing the pending results of the task.

           def executor = java.util.concurrent.Executors.newSingleThreadExecutor()
           try {
             def future = executor.submit {
               return 'works'
             }
             assert future.get() == 'works'
           } finally {
             executor.shutdown()
           }

      Since:
        5.0.0