Extensions to the ExecutorService interface.
| Type Params | Return Type | Name and description |
|---|---|---|
<T> |
static T |
executeAndShutdown(ExecutorService self, Closure<T> closure)Execute the given closure, performing a shutdown after it has exited (see shutdownAwaitTermination). |
|
static void |
shutdownAwaitTermination(ExecutorService self)Initiate a shutdown, waiting 5 seconds before forcing termination. |
Execute the given closure, performing a shutdown after it has exited (see shutdownAwaitTermination).
closure
- Called within the context of a try/finally block with the executor
service itself for performing any parallel tasks.Initiate a shutdown, waiting 5 seconds before forcing termination.