Summary
Modern applications increasingly require asynchronous, multithreaded code to deliver adequate performance and quality user experiences.
Kotlin applications have a variety of tools available for writing async code. As in Java, we can make use of Threads, ThreadPools, and Executors to control our applications' threading model. There are more advanced tools at our disposal, such as RxJava, that can be leveraged to simplify writing these asynchronous operations across both Java and Kotlin. In this chapter, we examined how Kotlin supports coroutines as a first-party solution for writing non-blocking, asynchronous code. Coroutines allow developers to write async code in an imperative manner that is easy to read and follow, while also being ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access