Condividi tramite


ThreadLocal.Set(Object) Method

Definition

Sets the current thread's copy of this thread-local variable to the specified value.

[Android.Runtime.Register("set", "(Ljava/lang/Object;)V", "GetSet_Ljava_lang_Object_Handler")]
public virtual void Set (Java.Lang.Object? value);
[<Android.Runtime.Register("set", "(Ljava/lang/Object;)V", "GetSet_Ljava_lang_Object_Handler")>]
abstract member Set : Java.Lang.Object -> unit
override this.Set : Java.Lang.Object -> unit

Parameters

value
Object

the value to be stored in the current thread's copy of this thread-local.

Attributes

Remarks

Sets the current thread's copy of this thread-local variable to the specified value. Most subclasses will have no need to override this method, relying solely on the #initialValue method to set the values of thread-locals.

Java documentation for java.lang.ThreadLocal.set(T).

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