await 바로 다음에 오는 async 호출을 보고합니다. 그러한 호출은 블록 호출로 바꿀 수 있습니다.

예:


  suspend fun test(ctx: CoroutineContext, scope: CoroutineScope) {
      scope.async(ctx) { doSomeJob() }.await()
  }

빠른 수정 적용 후:


  suspend fun test(ctx: CoroutineContext, scope: CoroutineScope) {
      withContext(scope.coroutineContext + ctx) { doSomeJob() }
  }