- Learning Concurrency in Kotlin
- Miguel Angel Castiblanco Torres
- 129字
- 2021-08-05 10:46:51
Job and Deferred
We can divide our asynchronous functions into two groups:
- Those without a result. Common scenarios are background tasks that write to a log, send analytics, and similar tasks. This type can include background tasks that may be monitored for completion but that don't have a result.
- Those that return a result. For example, if an asynchronous function is fetching information from a web service, you will most likely want to have that function return that information in order to use it.
In both cases, you will still want to have access to the task and react if there is an exception or cancel them if their work is not required anymore. Let's take a look at how we can create and interact with both types.
推薦閱讀
- DBA攻堅指南:左手Oracle,右手MySQL
- Learning Cython Programming
- Oracle 11g從入門到精通(第2版) (軟件開發視頻大講堂)
- C#完全自學教程
- Vue.js快跑:構建觸手可及的高性能Web應用
- Mastering C# Concurrency
- Learning Three.js:The JavaScript 3D Library for WebGL
- R Deep Learning Cookbook
- 組態軟件技術與應用
- Learning OpenCV 3 Computer Vision with Python(Second Edition)
- Node.js:來一打 C++ 擴展
- C專家編程
- 自學Python:編程基礎、科學計算及數據分析(第2版)
- Flink核心技術:源碼剖析與特性開發
- 軟件測試(慕課版)