Kotlin-Coroutines 中的async与await
Coroutines
官网说明
什么是协程?(摘自官网)
Asynchronous or non-blocking programming is an important part of the development landscape. 用于异步或非阻塞 编程。
简单概括 :
同步的方式去编写异步执行的代码
协程依赖于线程
协程挂起时不需要阻塞线程,几乎是无代价的.
一个线程中可以创建