Share via


LongAdder.Reset Method

Definition

Resets variables maintaining the sum to zero.

[Android.Runtime.Register("reset", "()V", "GetResetHandler", ApiSince=24)]
public virtual void Reset ();
[<Android.Runtime.Register("reset", "()V", "GetResetHandler", ApiSince=24)>]
abstract member Reset : unit -> unit
override this.Reset : unit -> unit
Attributes

Remarks

Resets variables maintaining the sum to zero. This method may be a useful alternative to creating a new adder, but is only effective if there are no concurrent updates. Because this method is intrinsically racy, it should only be used when it is known that no threads are concurrently updating.

Java documentation for java.util.concurrent.atomic.LongAdder.reset().

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