Language

VarHandle.SetVolatile(Object[]) Method

Definition

Sets the value of a variable to the newValue, with memory semantics of setting as if the variable was declared volatile.

[Android.Runtime.Register("setVolatile", "([Ljava/lang/Object;)V", "", ApiSince=33)]
public void SetVolatile(params Java.Lang.Object[]? args);
[<Android.Runtime.Register("setVolatile", "([Ljava/lang/Object;)V", "", ApiSince=33)>]
member this.SetVolatile : Java.Lang.Object[] -> unit

Parameters

args
Object[]

the signature-polymorphic parameter list of the form (CT1 ct1,..., CTn ctn, T newValue), statically represented using varargs.

Attributes

Remarks

Sets the value of a variable to the newValue, with memory semantics of setting as if the variable was declared volatile. The method signature is of the form (CT1 ct1,..., CTn ctn, T newValue)void. The symbolic type descriptor at the call site of setVolatile must match the access mode type that is the result of calling accessModeType(VarHandle.AccessMode.SET_VOLATILE) on this VarHandle.

Java reference for java.lang.invoke.VarHandle.setVolatile.

Applies to