- 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
推薦閱讀
- Learn ECMAScript(Second Edition)
- Kubernetes實戰(zhàn)
- Python自動化運維快速入門
- BeagleBone Media Center
- 學(xué)習(xí)正則表達式
- C++從入門到精通(第5版)
- 第一行代碼 C語言(視頻講解版)
- jQuery技術(shù)內(nèi)幕:深入解析jQuery架構(gòu)設(shè)計與實現(xiàn)原理
- Getting Started with React VR
- Mastering SciPy
- JavaWeb從入門到精通(視頻實戰(zhàn)版)
- 軟硬件綜合系統(tǒng)軟件需求建模及可靠性綜合試驗、分析、評價技術(shù)
- Test-Driven Java Development(Second Edition)
- Lucene 4 Cookbook
- Cocos2D權(quán)威指南