is there a way to call a kotlin suspend function f...
# kotlin-native
s
is there a way to call a kotlin suspend function from a flow collector in swift? i tried wrapping the call to the suspend function in a swift Task but get an error saying suspend functions can only be called from the main thread, even though I try to use
withContext
in my suspend function. If I try to use
DispatchQueue.main.async
it complains about passing a function type
() aync ->()
to a param expecting sync function type. I'm using the experimental native memory model in my kotlin module btw.
oh i was forgetting to add a completion handler