IExecutorService.ShutdownNow Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution.
[Android.Runtime.Register("shutdownNow", "()Ljava/util/List;", "GetShutdownNowHandler:Java.Util.Concurrent.IExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public System.Collections.Generic.IList<Java.Lang.IRunnable>? ShutdownNow ();
[<Android.Runtime.Register("shutdownNow", "()Ljava/util/List;", "GetShutdownNowHandler:Java.Util.Concurrent.IExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member ShutdownNow : unit -> System.Collections.Generic.IList<Java.Lang.IRunnable>
Returns
list of tasks that never commenced execution
- Attributes
Remarks
Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution.
This method does not wait for actively executing tasks to terminate. Use #awaitTermination awaitTermination
to do that.
There are no guarantees beyond best-effort attempts to stop processing actively executing tasks. For example, typical implementations will cancel via Thread#interrupt
, so any task that fails to respond to interrupts may never terminate.
Java documentation for java.util.concurrent.ExecutorService.shutdownNow()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.