我正在尝试编写一个函数,它异步运行两个操作,并使用Kotlin协程返回结果。例如,我希望我的getData方法大致同时运行我的两个longRunningOperationX方法,这样我就可以更快地获得组合结果: fun getData(): String {
val stringOne中,我可以使用launch和async方法运行这些操作。} 但是,正如您可能知道的那样,协程作用域中的<
我希望在完成将数据保存到数据库的协程后,将livedata boolean标志设置为true。我当前的代码如下: private suspend fun updatePlace(eventId: Long, placeName: String, placeAddressthe updatePlace function is completed我一直在阅读有