Racci
11/17/2022, 7:34 AMsimon.vergauwen
11/17/2022, 7:50 AMAtomic<A>
and pass it between multiple functions, or classes.
The KDoc also states that if you're only using this for a private val
and don't have a need for the other things I listed, and are not a library author, it's advised to just use atomicfu.Racci
11/17/2022, 7:52 AMsimon.vergauwen
11/17/2022, 7:55 AMsimon.vergauwen
11/17/2022, 7:56 AMAtomicInt
, etc for MPP.
If you look at the implementation of arrow's atomic you'll find that it's pretty straight forward to do.Racci
11/17/2022, 7:57 AMsimon.vergauwen
11/17/2022, 7:58 AM