- 博客(3)
- 资源 (4)
- 问答 (2)
- 收藏
- 关注
原创 Kolin协程与Retrofit 2.6.1完美合璧
协程有多么好用相比我们不需要再多赘述了,协程如何搭配旧版本的 Retrofit 使用相比大家也在网上看到过很多文章,大致如下://扩展 await() 函数 private suspend fun <T> Call<T>.await(): T { return suspendCancellableCoroutine { continuation -...
2019-08-12 15:07:49 3113 2
原创 Kotlin协程 —— 今天说说 launch 与 async
上文我们已经知道了,在没有CoroutineScope时,我们可以通过实现该接口,或者使用 runBlocking 方法,来使我们的程序可以调用 suspend 挂起函数。今天我们来看看 Builders.common 下的几个构建协程函数:launch 与 async 函数launch 函数在上一篇文章中我们已经接触过数次 launch 函数了,他的主要作用就是在当前协程作用域中创建一个新...
2019-08-09 10:38:01 14963 2
原创 Kotlin协程 ——从 runBlocking 与 coroutineScope 说起
关于协程我们不多阐述,详细内容请查看官方文档,本文只谈谈 runBlocking与 coroutineScope。runBlocking我们先来看看 runBlocking 文档是如何描述该函数的:Runs a new coroutine and blocks the current thread interruptibly until its completion. This funct...
2019-08-07 15:10:14 20675 2
StarUML 3.0.1 Mac 版破解补丁
2018-06-30
TA创建的收藏夹 TA关注的收藏夹
TA关注的人