Example usage for java.util.concurrent.atomic AtomicInteger lazySet

List of usage examples for java.util.concurrent.atomic AtomicInteger lazySet

Introduction

In this page you can find the example usage for java.util.concurrent.atomic AtomicInteger lazySet.

Prototype

public final void lazySet(int newValue) 

Source Link

Document

Sets the value to newValue , with memory effects as specified by VarHandle#setRelease .

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    AtomicInteger atomicInteger = new AtomicInteger();

    atomicInteger.lazySet(2);

    System.out.println(atomicInteger);
}