Henrik
01/24/2020, 7:32 AMOlenyov Kirill
01/24/2020, 8:46 AMPiasy
01/24/2020, 8:47 AMAtomicReference
, and call compareAndSet
when you want to update it.Olenyov Kirill
01/24/2020, 8:57 AMPiasy
01/24/2020, 9:02 AMHenrik
01/24/2020, 9:03 AMPiasy
01/24/2020, 9:04 AMAtomicReference
can only be accessed in Kotlin Native.Henrik
01/24/2020, 9:05 AMUnresolved reference: AtomicReference
, even if I only use it in iOS-specific code and build for IosX64:
val testRef = AtomicReference(someData)
Piasy
01/24/2020, 10:10 AMimport kotlin.native.concurrent.AtomicReference
?Henrik
01/24/2020, 10:16 AMimport kotlin.native.concurrent
That seems to do the trick, thank you again!kpgalligan
01/24/2020, 12:43 PMHenrik
01/24/2020, 12:47 PMThreadLocal
but I don't think it is the right fit in this contextkpgalligan
01/24/2020, 12:50 PMHenrik
01/24/2020, 2:09 PMAtomicReference
is used as a private variable inside a frozen class, will it then be frozen too, so that I cannot update it using compareAndSet
?