AtomicIntArray

expect constructor(size: Int)(source)

Creates a new AtomicIntArray of the specified size, with all elements initialized to zero.

Throws

if the specified size is negative.

Samples

import kotlin.concurrent.atomics.*

fun main() { 
   //sampleStart 
   val a = AtomicIntArray(5)
println(a.toString()) // [0, 0, 0, 0, 0] 
   //sampleEnd
}

expect constructor(array: IntArray)(source)

Creates a new AtomicIntArray filled with elements of the given array.

Samples

import kotlin.concurrent.atomics.*

fun main() { 
   //sampleStart 
   val a = AtomicIntArray(intArrayOf(1, 2, 3))
println(a.toString()) // [1, 2, 3] 
   //sampleEnd
}
actual constructor(size: Int)(source)

Creates a new AtomicIntArray of the given size, with all elements initialized to zero.

Throws

if the specified size is negative.


actual constructor(array: IntArray)(source)

Creates a new AtomicIntArray filled with elements of the given array.

actual constructor(size: Int)(source)

Creates a new AtomicIntArray of the given size, with all elements initialized to zero.

Throws

if the specified size is negative.


actual constructor(array: IntArray)(source)

Creates a new AtomicIntArray filled with elements of the given array.

actual constructor(size: Int)(source)

Creates a new AtomicIntArray of the given size, with all elements initialized to zero.

Throws

if the specified size is negative.


actual constructor(array: IntArray)(source)

Creates a new AtomicIntArray filled with elements of the given array.

actual constructor(size: Int)(source)

Creates a new AtomicIntArray of the given size, with all elements initialized to zero.

Throws

if the specified size is negative.


actual constructor(array: IntArray)(source)

Creates a new AtomicIntArray filled with elements of the given array.

actual constructor(size: Int)(source)

Creates a new AtomicIntArray of the given size, with all elements initialized to zero.

Throws

if the specified size is negative.


actual constructor(array: IntArray)(source)

Creates a new AtomicIntArray filled with elements of the given array.