https://kotlinlang.org logo
#coroutines
Title
# coroutines
s

SrSouza

11/16/2019, 4:34 PM
Hi guys, what is the easy way to have something like ConcurrencyHashMap in Kotlin Multiplatform with Coroutines multiplatform? I'm building a library that the functions changes the values of a Map, removing, searching and adding values, and anyone that calls this functions can call in different threads(or workers in native if I'm correctly)
k

Kroppeb

11/16/2019, 6:12 PM
Either make the map an actor coroutine or use a mutex I think
s

SrSouza

11/16/2019, 7:04 PM
I was reading about actors but apparently is just JVM, my project is Multiplatform and using Coroutines common
3 Views