what’s the equivalent of a Completable? like if I ...
# coroutines
o
what’s the equivalent of a Completable? like if I have a method that just deletes thing and I don’t care what ends up happening with it, I just want to know if it’s done or not
m
A suspend function
s
CompletableDeferred
is probably what you're looking for. You can
await
it in a
suspend
way, or check it's state through
getCompleted
. https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-completable-deferred/
o
ah this is async await then
so no return type @mkrussel?
m
yep
o
how bold
s
So not fire-and-forget? A
suspend
fun without a return type should be better indeed.