ThreadPoolExecutor.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")]
public override System.Collections.Generic.IList<Java.Lang.IRunnable>? ShutdownNow ();
[<Android.Runtime.Register("shutdownNow", "()Ljava/util/List;", "GetShutdownNowHandler")>]
override this.ShutdownNow : unit -> System.Collections.Generic.IList<Java.Lang.IRunnable>
Returns
- 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. These tasks are drained (removed) from the task queue upon return from this method.
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. This implementation interrupts tasks via Thread#interrupt
; any task that fails to respond to interrupts may never terminate.
Java documentation for java.util.concurrent.ThreadPoolExecutor.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.