AtomicIntArray
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
}
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
}
Creates a new AtomicIntArray of the given size, with all elements initialized to zero.
Throws
if the specified size is negative.
Creates a new AtomicIntArray filled with elements of the given array.
Creates a new AtomicIntArray of the given size, with all elements initialized to zero.
Throws
if the specified size is negative.
Creates a new AtomicIntArray filled with elements of the given array.
Creates a new AtomicIntArray of the given size, with all elements initialized to zero.
Throws
if the specified size is negative.
Creates a new AtomicIntArray filled with elements of the given array.
Creates a new AtomicIntArray of the given size, with all elements initialized to zero.
Throws
if the specified size is negative.
Creates a new AtomicIntArray filled with elements of the given array.
Creates a new AtomicIntArray of the given size, with all elements initialized to zero.
Throws
if the specified size is negative.
Creates a new AtomicIntArray filled with elements of the given array.