Elements of Kotlin Coroutines

Elements of Kotlin Coroutines

简介:

协程是Kotlin世界的重要补充。协程提供了一流的反应式编程方法,与语言本身紧密集成。协程有助于简化多线程开发,允许您保留 “正常” 的命令式编程模型,同时仍然指定某些代码段在替代线程池上运行。除此之外,流和通道还允许您对数据流进行建模,同时保留相同的多线程特性。本书旨在帮助您 “启动” 协程,以及如何在您的项目中应用它们。本书中的大部分示例代码都可以在Klassbook中找到,因此您可以尝试在Web浏览器中运行它。一些Android示例可通过GitLab存储库获得。

英文简介:

Coroutines are an important addition to the world of Kotlin.

Coroutines offer a first-class reactive programming approach, tightly integrated with the language itself. Coroutines help simplify multi-threaded development, allowing you to retain a "normal" imperative sort of programming model while still designating certain code sections to run on alternative thread pools. Beyond that, flows and channels let you model data streams while retaining the same multi-threaded characteristics.

This book is designed to help you get “spun up” on coroutines and how they can be applied in your projects.

Most of the sample code from the book is available in the Klassbook, so you can try running it in your Web browser. Some Android samples are available via GitLab repositories.

书名
Elements of Kotlin Coroutines
译名
Kotlin 协程的元素
语言
英语
年份
2021
页数
233页
大小
1.11 MB
标签
  • Kotlin
  • 下载
    pdf iconElements of Kotlin Coroutines.pdf
    密码
    65536

    最后更新:2025-04-12 23:57:59

    ←Essential Scala

    →Kotlin in Action