scope

fun Loggable.scope(io: IO? = null): CoroutineScope(source)

快速创建一个协程作用域,并在崩溃时记录日志。

使用 scope() 等价于 CoroutineScope(Dispatchers.Default + SupervisorJob())

使用 scope(IO) 等价于 CoroutineScope(Dispatchers.IO + SupervisorJob())