Kotlin Coroutines by Tutorials (Second Edition): Mastering Coroutines in Kotlin and Android
by raywenderlich Tutorial Team,Filip Babić,Nishant Srivastava
Print Length 页数: 352 pages
Publisher finelybook 出版社: Razeware LLC (30 Sept. 2019)
Language 语言: English
ISBN-10: 1942878958
ISBN-13: 9781942878957
Book Description
Learn Coroutines in Kotlin and Android!
Executing background tasks has always been a big challenge in every environment and,in particular,on mobile devices where resources are limited. Kotlin has simplified the way you can write code improving your productivity with a new programming paradigm,enhancing object-oriented and functional programming with with simple,powerful and new constructs. Coroutines are one of these!
Who This Book Is For
This book is for intermediate Kotlin or Android developers who already know the basics of UI development but want to learn coroutine API in order to simplify and optimize their code.
Topics Covered in This Book
Asynchronous programming: Learn what asynchronous programming means and how to achieve it using not blocking calls.
Configuration: Learn how to configure IntelliJ and Android Studio in order to use Coroutine APIs.
Coroutine principles**: Learn what coroutines and launching builders are and how to manage Job dependencies.
Suspending functions: This is the main concept around coroutines and you’ll learn how to declare a suspending function and how to deal with results.
Sequences and Iterators: Learn how to manage theoretically infinite collections of data in an efficient way using Sequences,Iterators and the yield function.
Thread communication techniques**: Learn how different tasks can communicate using Channels,Actors,and specific coroutine operators.
And much more,including benchmarks,Broadcast Channels,State machines!
One thing you can count on: After reading this book,you’ll be prepared to take advantage of all the improvements coroutines have to offer!
Introduction
Chapter 1: What Is Asynchronous Programming?
Chapter 2: Setting Up Your Build Environments
Chapter 3: Getting Started with Coroutines
Chapter 4: Suspending Functions
Chapter 5: Async/Await
Chapter 6: Coroutine Context
Chapter 7: Coroutine Contexts & Dispatchers
Chapter 8: Exception Handling
Chapter 9: Manage Cancellation
Chapter 10: Building Sequences & Iterators with Yield
Chapter 11: Channels
Chapter 12: Broadcast Channels
Chapter 13: Producer & Actors
Chapter 14: Beginning with Coroutines Flow
Chapter 15: Testing Coroutines
Chapter 16: Android Concurrency Before Coroutines
Chapter 17: Coroutines on Android -Part 1
Chapter 18: Coroutines on Android -Part2
Conclusion