当前位置:网站首页>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.
边栏推荐
- Missing library while loading shared libraries: libisl so. 15: cannot open shared object file: No such file
- Technology sharing | Frida's powerful ability to realize hook functions
- Y54. Chapter III kubernetes from introduction to mastery -- ingress (27)
- Machine learning notes (constantly updating...)
- stm32F407-------DMA
- 【Camera专题】HAL层-addChannel和startChannel简析
- DML Foundation
- [Yu Yue education] reference materials of chemical experiment safety knowledge of University of science and technology of China
- Network security - Information Collection
- Network security - man in the middle attack
猜你喜欢
詳細些介紹如何通過MQTT協議和華為雲物聯網進行通信
Technology sharing | Frida's powerful ability to realize hook functions
stm32F407-------ADC
Rockchip3399 start auto load driver
Everything file search tool
What are the differences between software testers with a monthly salary of 7K and 25K? Leaders look up to you when they master it
The technology boss is ready, and the topic of position C is up to you
y54.第三章 Kubernetes从入门到精通 -- ingress(二七)
[shutter] shutter debugging (debugging fallback function | debug method of viewing variables in debugging | console information)
Learn BeanShell before you dare to say you know JMeter
随机推荐
What are the key points often asked in the redis interview
Method of removing webpage scroll bar and inner and outer margins
[shutter] bottom navigation bar implementation (bottomnavigationbar bottom navigation bar | bottomnavigationbaritem navigation bar entry | pageview)
leetcode961. Find the elements repeated N times in the array with length 2n
Leetcode(540)——有序数组中的单一元素
Machine learning notes (constantly updating...)
Network security ACL access control list
What are MySQL locks and classifications
Analysis, use and extension of open source API gateway apisex
Network security NAT network address translation
[shutter] shutter debugging (debugging fallback function | debug method of viewing variables in debugging | console information)
[Yu Yue education] reference materials of love psychology of China University of mining and technology
Custom components, using NPM packages, global data sharing, subcontracting
2022 financial product revenue ranking
Network security - dynamic routing protocol rip
Network security OpenVAS
es6 filter() 数组过滤方法总结
His experience in choosing a startup company or a big Internet company may give you some inspiration
Analyzing several common string library functions in C language
Network security - firewall