forked from sergeych/crypto2
6 lines
179 B
Kotlin
6 lines
179 B
Kotlin
package net.sergeych.tools
|
|
|
|
@Suppress("unused")
|
|
class AtomicCounter(initialValue: Long = 0) : AtomicValue<Long>(initialValue) {
|
|
fun incrementAndGet(): Long = mutate { it+1 }
|
|
} |