Deferred result type in case if the return value is not used.
If the return value, nothing will wait until the function completes.
Example:
fun calcEverythingAsync() = CompletableDeferred(42)
fun usage() {
calcEverythingAsync()
}
A quick-fix is suggested to introduce a variable with the Deferred initializer:
fun calcEverythingAsync() = CompletableDeferred(42)
fun usage() {
val answer = calcEverythingAsync()
}