Share via


ThreadPoolExecutor.DiscardOldestPolicy.RejectedExecution Method

Definition

Obtains and ignores the next task that the executor would otherwise execute, if one is immediately available, and then retries execution of task r, unless the executor is shut down, in which case task r is instead discarded.

[Android.Runtime.Register("rejectedExecution", "(Ljava/lang/Runnable;Ljava/util/concurrent/ThreadPoolExecutor;)V", "GetRejectedExecution_Ljava_lang_Runnable_Ljava_util_concurrent_ThreadPoolExecutor_Handler")]
public virtual void RejectedExecution (Java.Lang.IRunnable? r, Java.Util.Concurrent.ThreadPoolExecutor? e);
[<Android.Runtime.Register("rejectedExecution", "(Ljava/lang/Runnable;Ljava/util/concurrent/ThreadPoolExecutor;)V", "GetRejectedExecution_Ljava_lang_Runnable_Ljava_util_concurrent_ThreadPoolExecutor_Handler")>]
abstract member RejectedExecution : Java.Lang.IRunnable * Java.Util.Concurrent.ThreadPoolExecutor -> unit
override this.RejectedExecution : Java.Lang.IRunnable * Java.Util.Concurrent.ThreadPoolExecutor -> unit

Parameters

r
IRunnable

the runnable task requested to be executed

e
ThreadPoolExecutor

the executor attempting to execute this task

Implements

Attributes

Remarks

Obtains and ignores the next task that the executor would otherwise execute, if one is immediately available, and then retries execution of task r, unless the executor is shut down, in which case task r is instead discarded.

Java documentation for java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy.rejectedExecution(java.lang.Runnable, java.util.concurrent.ThreadPoolExecutor).

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.

Applies to