官术网_书友最值得收藏!

  • 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
主站蜘蛛池模板: 比如县| 兰州市| 宁陵县| 英吉沙县| 静乐县| 陆丰市| 山东省| 祁门县| 商都县| 礼泉县| 伊宁市| 清苑县| 洛隆县| 双鸭山市| 四子王旗| 墨竹工卡县| 丹凤县| 乌拉特后旗| 自治县| 安平县| 建平县| 吴川市| 安西县| 无锡市| 临高县| 万全县| 襄樊市| 洛川县| 敖汉旗| 许昌县| 甘肃省| 湘西| 昔阳县| 盱眙县| 上虞市| 蛟河市| 嘉善县| 葫芦岛市| 红安县| 桐柏县| 铜山县|