Zum Inhalt springen

Deferred Not Awaited (ARCH8029)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key kotlin.async.deferred-not-awaited · Severity warning · Category async

Flags a Deferred assigned to a local that is never awaited in the function - the value is a handle, not the result.

val d = async { load() }
return d
val d = async { load() }
return d.await()

Call await() on the Deferred where the result is needed.