ScheduledThreadPoolExecutor.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. These tasks are drained (removed) from the task queue upon return from this method.

<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. This implementation interrupts tasks via {@link Thread#interrupt}; any task that fails to respond to interrupts may never terminate.

@return list of tasks that never commenced execution. Each element of this list is a {@link ScheduledFuture}. For tasks submitted via one of the {@code schedule} methods, the element will be identical to the returned {@code ScheduledFuture}. For tasks submitted using {@link #execute execute}, the element will be a zero-delay {@code ScheduledFuture}. @throws SecurityException {@inheritDoc}

class ScheduledThreadPoolExecutor
override
List!(Runnable)
shutdownNow
()

Meta