I don't know if this should be here or in
#kotlin-native but here goes:
Is
resumeWith
on
kotlin.coroutines.Continuation
a mutating operation? If so, how can I share it with another thread in order to bridge callback-style APIs and suspend functions?
My scenario: I have a suspend function in a shared API (shared between Android and iOS). On Android I just implement it as a regular suspend function. On iOS, I'm attempting to use
continuation
and call it from my callback.
• If I freeze the continuation object I receive
InvalidMutabilityException
,
• if I don't freeze it, I receive
IncorrectDereferenceException
.
I'm using coroutines 1.3.5-native-mt