Share via


ThreadPoolExecutor.BeforeExecute(Thread, IRunnable) Method

Definition

Method invoked prior to executing the given Runnable in the given thread.

[Android.Runtime.Register("beforeExecute", "(Ljava/lang/Thread;Ljava/lang/Runnable;)V", "GetBeforeExecute_Ljava_lang_Thread_Ljava_lang_Runnable_Handler")]
protected virtual void BeforeExecute (Java.Lang.Thread? t, Java.Lang.IRunnable? r);
[<Android.Runtime.Register("beforeExecute", "(Ljava/lang/Thread;Ljava/lang/Runnable;)V", "GetBeforeExecute_Ljava_lang_Thread_Ljava_lang_Runnable_Handler")>]
abstract member BeforeExecute : Java.Lang.Thread * Java.Lang.IRunnable -> unit
override this.BeforeExecute : Java.Lang.Thread * Java.Lang.IRunnable -> unit

Parameters

t
Thread

the thread that will run task r

r
IRunnable

the task that will be executed

Attributes

Remarks

Method invoked prior to executing the given Runnable in the given thread. This method is invoked by thread t that will execute task r, and may be used to re-initialize ThreadLocals, or to perform logging.

This implementation does nothing, but may be customized in subclasses. Note: To properly nest multiple overridings, subclasses should generally invoke super.beforeExecute at the end of this method.

Java documentation for java.util.concurrent.ThreadPoolExecutor.beforeExecute(java.lang.Thread, 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