ThreadPoolExecutor.BeforeExecute(Thread, IRunnable) 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.
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
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.
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.