what could be a Kotlin MP counterpart of the Java ...
# multiplatform
e
what could be a Kotlin MP counterpart of the Java
Vector
(essentially a thread safe
ArrayList
)?
p
I'm not sure if there is something useful for your situation in https://github.com/Kotlin/kotlinx-atomicfu. I haven't used it directly yet. I've only seen it as transitive dependency in my projects so far. But that's more like
java.util.concurrent.atomic.Atomic*Array
and not the same as Vector.
e
thanks for the head up, I'll give it a look
m
Maybe in the long run it would be better to have a look at https://github.com/Kotlin/kotlinx.collections.immutable instead.
👍 2
k
I don't think atomicfu has collections, just locks and atomics, although I could be wrong. We implemented a very basic set of concurrently collection here: https://github.com/touchlab/Stately/, module
stately-concurrent-collections
. I assume something more comprehensive will be released at some point by somebody, but haven't heard of anything yet.