I have a need to control access to counts in a multi-thread app. Kotlin seems to have 2 different solutions. My IDE (Idea) suggests that the var is AtomicInteger, i.e.
var count = AtomicInteger(0)
Whilst the online help suggests it should be AtomicInt and this is experimental, i.e
@ExperimentalAtomicApi
var count = AtomicInt(0)
Is AtomicInteger now deprecated? Is it being replaced?