Slide 10
Slide 10 text
CoroutineScope
coroutineScope 関数はブロックとしてCoroutineScopeのレシーバ付き関数リテラルを受け
取る。 async 関数は CoroutineScope の拡張関数になっている。
// coroutineScope関数
suspend fun coroutineScope(block: suspend CoroutineScope.() -> R): R
// async関数
fun CoroutineScope.async(
context: CoroutineContext = EmptyCoroutineContext,
start: CoroutineStart = CoroutineStart.DEFAULT,
block: suspend CoroutineScope.() -> T
): Deferred
9