How can I mutate a `MutableSet` from different thr...
# coroutines
b
How can I mutate a
MutableSet
from different threads with coroutines on native without getting the
InvalidMutablityException
?
m
if atomicfu doesn't help, maybe you should rethink an architecture, maybe you could pass a funtion that will update list properly on another thread
d
There's also https://github.com/touchlab/Stately if all esle fails.
b
@Mikołaj Kąkol what's
atomicfu
?
m
g
Protect it with Mutex or use actor
atomicfu is also an option, but it's a low level primitive and requires more careful usage