Kotlin协程 —— 今天说说 launch 与 async_kotlin launch async-CSDN博客

网站介绍:文章浏览阅读1.4w次,点赞5次,收藏13次。上文我们已经知道了,在没有CoroutineScope时,我们可以通过实现该接口,或者使用 runBlocking 方法,来使我们的程序可以调用 suspend 挂起函数。今天我们来看看 Builders.common 下的几个构建协程函数:launch 与 async 函数launch 函数在上一篇文章中我们已经接触过数次 launch 函数了,他的主要作用就是在当前协程作用域中创建一个新..._kotlin launch async