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

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

Introduction

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

Prototype

public final void lazySet(int i, int newValue) 

Source Link

Document

Sets the element at index i to newValue , with memory effects as specified by VarHandle#setRelease .

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    AtomicIntegerArray atomicIntegerArray = new AtomicIntegerArray(new int[] { 0, 1, 2, 3 });

    atomicIntegerArray.lazySet(0, 10);

    System.out.println(atomicIntegerArray);
}