当前位置:网站首页>Job object of collaboration in kotlin
Job object of collaboration in kotlin
2022-07-03 02:07:00 【yu-Knight】
Kotlin Medium range Job object
Job object
- For each collaboration created ( adopt launch perhaps async), Will return a Job example , This instance is the unique identifier of the coroutine , And manage the lifecycle of the collaboration .
- A task can contain a series of States : New creation (New)、 active (Active)、 Finishing (Completing)、 Completed (Completed)、 Cancel (Cancelling) And have been cancelled (Cancelled).
Although we don't have direct access to these States , But we can visit Job Properties of :isActive、isCancelled and isCompleted.
Job Life cycle of
- If the process is active , The coroutine runs in error or calls job.cancel() Will set the current task to cancel (Cancelling) state (isActive = false,isCancelled = true).
When all the subprocesses are finished , The program will enter the canceled program (Cancelled) state , here isCompleted = true.
边栏推荐
- Network security - man in the middle attack
- In the face of difficult SQL requirements, HQL is not afraid
- stm32F407-------ADC
- Use go language to realize try{}catch{}finally
- DQL basic operation
- Huakaiyun | virtual host: IP, subnet mask, gateway, default gateway
- 小程序开发黑马购物商城中遇到的问题
- Groovy, "try with resources" construction alternative
- [camera special topic] Hal layer - brief analysis of addchannel and startchannel
- 微信小程序開發工具 POST net::ERR_PROXY_CONNECTION_FAILED 代理問題
猜你喜欢
【Camera专题】Camera dtsi 完全解析
Query product cases - page rendering data
Depth (penetration) selector:: v-deep/deep/ and > > >
stm32F407-------DMA
[fluent] fluent debugging (debug debugging window | viewing mobile phone log information | setting normal breakpoints | setting expression breakpoints)
[leetcode] 797 and 1189 (basis of graph theory)
In 2022, 95% of the three most common misunderstandings in software testing were recruited. Are you that 5%?
Introduce in detail how to communicate with Huawei cloud IOT through mqtt protocol
Solution for processing overtime orders (Overtime unpaid)
Processing of tree structure data
随机推荐
Query product cases - page rendering data
浏览器是如何对页面进行渲染的呢?
In the face of difficult SQL requirements, HQL is not afraid
Redis: simple use of redis
Huakaiyun | virtual host: IP, subnet mask, gateway, default gateway
Network security - Trojan horse
stm32F407-------ADC
Network security - dynamic routing protocol rip
Custom components, using NPM packages, global data sharing, subcontracting
Where is the future of test engineers? Confused to see
Leetcode 183 Customers who never order (2022.07.02)
树形结构数据的处理
Network security - scan
PS remove watermark details
Storage basic operation
Leetcode (540) -- a single element in an ordered array
[shutter] bottom navigation bar implementation (bottomnavigationbar bottom navigation bar | bottomnavigationbaritem navigation bar entry | pageview)
DML Foundation
Visualisation de l'ensemble de données au format yolov5 (fichier labelme json)
微服务组件Sentinel (Hystrix)详细分析