kotlinx.coroutines.Deferred return type.
Functions that use Deferred as return type should have a name with the Async suffix.
Otherwise, it's recommended to mark a function as suspend and unwrap Deferred inside it.
Example:
fun calcEverything(): Deferred<Int> {
return CompletableDeferred(42)
}
After the quick-fix that adds the Async suffix applied:
fun calcEverythingAsync(): Deferred<Int> {
return CompletableDeferred(42)
}
After the quick-fix that converts the function into a suspend one applied:
suspend fun calcEverything(): Int {
return CompletableDeferred(42).await()
}