Share via


ThreadPoolExecutor.Execute(IRunnable) Method

Definition

Executes the given task sometime in the future.

[Android.Runtime.Register("execute", "(Ljava/lang/Runnable;)V", "GetExecute_Ljava_lang_Runnable_Handler")]
public override void Execute (Java.Lang.IRunnable? command);
[<Android.Runtime.Register("execute", "(Ljava/lang/Runnable;)V", "GetExecute_Ljava_lang_Runnable_Handler")>]
override this.Execute : Java.Lang.IRunnable -> unit

Parameters

command
IRunnable

the task to execute

Attributes

Exceptions

at discretion of RejectedExecutionHandler, if the task cannot be accepted for execution

if command is null

Remarks

Executes the given task sometime in the future. The task may execute in a new thread or in an existing pooled thread.

If the task cannot be submitted for execution, either because this executor has been shutdown or because its capacity has been reached, the task is handled by the current RejectedExecutionHandler.

Java documentation for java.util.concurrent.ThreadPoolExecutor.execute(java.lang.Runnable).

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