Reports map { it.await() } calls
on collections of Deferred.
This can be replaced by a more concise and potentially more efficient awaitAll() call.
See the documentation for kotlinx.coroutines.awaitAll for more details.
예:
suspend fun waitForResult(results: List<Deferred<String>>): List<String> {
return results.map { it.await() }
}
빠른 수정을 적용한 후:
suspend fun waitForResult(results: List<Deferred<String>>): List<String> {
return results.awaitAll()
}