I’m seeing an exception working with Flow across threads in Kotlin/native using the
native-mt
version of kotlinx.coroutines. I’ve been stuck on this for a while now. Can anyone point me in the right direction for how to fix this?
It’s throwing an error on the
emit(defaultValue)
.
Copy code
Caused by: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen kotlinx.coroutines.flow.internal.SafeCollector@f506be8