I don't know if this should be here or in <#C3SGXA...
# multiplatform
c
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
I receive these exceptions at the point that I call
continution.resumeWith
in my Swift code
For anyone interested in this, with coroutines 1.3.5-native-mt this does not work. I ended up using coroutines-worker library from Autodesk to get this to Work