ExecutorService.shutdownNow

Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution.

<p>This method does not wait for actively executing tasks to terminate. Use {@link #awaitTermination awaitTermination} to do that.

<p>There are no guarantees beyond best-effort attempts to stop processing actively executing tasks. For example, typical implementations will cancel via {@link Thread#interrupt}, so any task that fails to respond to interrupts may never terminate.

@return list of tasks that never commenced execution @throws SecurityException if a security manager exists and shutting down this ExecutorService may manipulate threads that the caller is not permitted to modify because it does not hold {@link java.lang.RuntimePermission}{@code ("modifyThread")}, or the security manager's {@code checkAccess} method denies access.

interface ExecutorService
List!(Runnable)
shutdownNow
()

Meta