runMain |
在主线程运行fun runMain(block: () -> Unit ): Unit |
scope |
异步作用域fun scope(block: suspend CoroutineScope.() -> Unit ): AndroidScope |
scopeNet |
网络请求的异步作用域 自动显示错误信息吐司fun scopeNet(block: suspend CoroutineScope.() -> Unit ): NetCoroutineScope |
withDefault |
切换到默认调度器suspend fun <T> withDefault(block: suspend CoroutineScope.() -> T): T |
withIO |
切换到IO程调度器suspend fun <T> withIO(block: suspend CoroutineScope.() -> T): T |
withMain |
切换到主线程调度器suspend fun <T> withMain(block: suspend CoroutineScope.() -> T): T |
withUnconfined |
切换到没有限制的调度器suspend fun <T> withUnconfined(block: suspend CoroutineScope.() -> T): T |