Is it okay for java code to pass an instance of `C...
# coroutines
d
Is it okay for java code to pass an instance of
Continuation
to a kotlin suspend function? Isn't it pretty much the same as using callbacks?
g
Yes, it's pretty similar
d
So I can expose suspend functions in my library and not have to worry about java users not being able to call them.
g
It's not the best kind of callback API (what should Java user to context for example). Much better to expose it for Java users as some proper Java asyncronous abstraction: completable future or RxJava single
Also it would be properly cancellable