在协程等待的过程中, 线程会返回线程池, 当协程等待结束, 协程会在线程池中一个空闲的线程上恢复. (The thread is returned to the pool while the coroutine is waiting, and when the waiting is done, the coroutine resumes on a free thread in the pool.) 启动协程 启动一个新的协程, 常用的主要有...
我们的IO 基准(https://github.com/ktorio/ktor-benchmarks/tree/main/io-benchmarks)测试基于真实的 Ktor 应用, 结果令人印象深刻. 一些测试结果表明, 性能提高了 90%以上, 我们还在努力进行更多改进. 支持服务器发送事件(SSE) 在Ktor 3.0 中, 我们为服务器和...
Kotlin官网:https://kotlinlang.org/Github 地址:https://github.com/JetBrains/kotlin 此次版本更新包括: Coroutines 的正式发布 Kotlin/Native Beta 版本 contracts inline classes Coroutines 终于进入稳定版本,以后可以在生产环境中使用了。 Kotlin / Native 进入 Beta 版本,可以将 Kotlin 代码直接编译为本机二进制...
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库:https://github.com/Kotlin/kotlinx.coroutines master 克隆/下载 git config --global user.name userName git config --global user.email userEmail 分支208 标签105 Natasha Murashkinadocs: Coroutines guide: update URL (#4411)f4f519b6天...
Co-Routines means cooperative routines . i.e routines which cooperate with each other.It means when one routine is executing , the other routine will not interfere with 1st coroutine w.r.t to memory , cpu ,any resource by suspending itself i.e without bl
Kotlin Coroutines不复杂, 我来帮你理一理 Kotlin协程通信机制: Channel 举的例子可能离实际的应用代码比较遥远. 这篇我们就从Android应用的角度, 看看实践中都有哪些地方可以用到协程. 本文被收录在:https://github.com/mengdd/KotlinTutorials Coroutines的用途 ...
基于Kotlin + Jetpack全家桶 + Coroutines(协程) 等架构实现的一款精简版Github客户端项目。 开源不易,如果喜欢的话希望给个Star或Fork^_^ ,谢谢 项目截图 下载体验 点击 下载(密码:123456) 下方二维码下载(每日上限100次,如达到上限,还是 clone 源码吧!✧(≖ ◡ ≖✿))) ...
项目的地址:https://github.com/xuexiangjys/XTask 使用文档:https://github.com/xuexiangjys/XTask/wiki Kotlin Coroutine kotlinx.coroutines 是由 JetBrains 开发的功能丰富的协程库。它包含本指南中涵盖的很多启用高级协程的原语,包括 launch、async 等等。 协程不是系统级线程,很多时候协程被称为“轻量级线程”、...
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1" 可以在 Github 上 clone kotlinx.coroutines 这个项目到你的工作站中。Android 生成的模板项目位于 ui/kotlinx-coroutines-android/example-app 目录。你可以在 Android Studio 中打开它并跟随本教程在 Android 上学习。 UI 协程基础 本节...
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.