Could we provide a mechanism for make the object ...
# kotlin-native
l
Could we provide a mechanism for make the object read from other thread possible but modify from other thread impossible?
k
Flows and Channels
k
Can you explain better? See if this is anything like what you want. There’s a version released with 1.3.70: https://dev.to/touchlab/kotlin-native-isolated-state-50l1
👍 1
You could enforce modifying thread, but read from anywhere
l
thanks for your response, This is what I need
isolated state is good. It simplifies sharing mutable objects in KN.but i am not sure is good for sharing code in MPP.
k
How so?
l
Maybe I just need some time to get used to this concurrency model
k
you'll probably need a lot of time for that. and by then they will have probably changed significant parts of it.
k
I wouldn’t plan on a lot of changes
k
well they have already changed quite a bit in the native-mt preview for coroutines
k
That’s a library. I’m talking about the model itself, and understanding of it. I would expect mt coroutines to stabilize quite a bit post release (but not sure if 1.3.71 will be a stable release)