Coroutine scope is responsible for the structure and parent-child relationships between different coroutines.
トップレベルではDispatchers.Main
を指定し、適宜子コルーチンでバックグラウンドで良い場合にasync(Dispatchers.Default)
としてバックグラウンド化する。
スレッドをブロックする。スコープ内の処理の実行が完了するまでスレッドをブロックする