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

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
主站蜘蛛池模板: 绥化市| 吉林省| 秦皇岛市| 胶南市| 玉山县| 防城港市| 巴彦县| 莱州市| 南开区| 连南| 北碚区| 青铜峡市| 香格里拉县| 西贡区| 湖南省| 黄浦区| 双峰县| 长武县| 绥滨县| 康定县| 新巴尔虎右旗| 密云县| 周宁县| 巴中市| 庄浪县| 兴隆县| 蒙城县| 东莞市| 信宜市| 察雅县| 内乡县| 五家渠市| 延吉市| 明水县| 太谷县| 邮箱| 思南县| 临桂县| 高台县| 阳原县| 班玛县|