`await` 是 JavaScript 中的一个关键字,用于等待异步操作(如网络请求、文件读取等)完成。当异步操作完成之后,程序会继续执行后续的代码。

fun <T> await(block: suspend () -> T): T

Runs block and blocks the calling thread until it completes.

Do not call this from a thread the coroutine itself needs, or it will deadlock.


fun <T> await(coroutineContext: CoroutineContext, block: suspend () -> T): T

Like await, with coroutineContext added to the call.