- Learning Concurrency in Kotlin
- Miguel Angel Castiblanco Torres
- 174字
- 2021-08-05 10:46:51
Life Cycle and Error Handling
Now that we have an application using coroutines in order to do network requests, it's time to add new features to it while putting into practice new concepts and improving the user experience.
In this chapter, we will start by taking a closer look at two types of asynchronous tasks: Job and Deferred. We will talk about their similarities and their differences, taking a closer look at their life cycle. We will also cover how to calculate their current state and what to expect in each state. Then, we will improve our RSS reader by having it fetch news concurrently from many news outlets and using the newly introduced topics to handle exceptions when a feed can't be reached.
Some of the topics we will cover during this chapter are as listed:
- Jobs and their use cases
- Life cycle of Job and Deferred
- Use cases for Deferred
- What to expect with each status of a Job
- How to calculate the current status of a Job
- How to handle exceptions
推薦閱讀
- Mastering Ext JS(Second Edition)
- Learning C# by Developing Games with Unity 2020
- Magento 2 Theme Design(Second Edition)
- R語言編程指南
- Learning Python by Building Games
- Building Serverless Applications with Python
- 數(shù)據(jù)結(jié)構(gòu)與算法分析(C++語言版)
- C++反匯編與逆向分析技術(shù)揭秘(第2版)
- C語言程序設(shè)計(jì)與應(yīng)用(第2版)
- Maker基地嘉年華:玩轉(zhuǎn)樂動(dòng)魔盒學(xué)Scratch
- Exploring SE for Android
- INSTANT Apache Hive Essentials How-to
- Get Your Hands Dirty on Clean Architecture
- Flask開發(fā)Web搜索引擎入門與實(shí)戰(zhàn)
- Visual Basic程序設(shè)計(jì)