Unnecessary Async Await (ARCH8025)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Key kotlin.async.unnecessary-async-await · Severity info · Category async
Flags async { x }.await() - a Deferred created only to be awaited immediately.
Incorrect
Section titled “Incorrect”val user = async { repo.load(id) }.await()Correct
Section titled “Correct”val user = repo.load(id)Call the suspend function directly; async is for work that runs concurrently with something else.