当前位置:网站首页>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.

边栏推荐
- 可视化yolov5格式数据集(labelme json文件)
- Network security - firewall
- MySQL learning 03
- Network security - Trojan horse
- Anna: Beibei, can you draw?
- Asian Games countdown! AI target detection helps host the Asian Games!
- 疫情当头,作为Leader如何进行团队的管理?| 社区征文
- PyTorch 卷积网络正则化 DropBlock
- The technology boss is ready, and the topic of position C is up to you
- Trial setup and use of idea GoLand development tool
猜你喜欢

MySQL learning 03

技术大佬准备就绪,话题C位由你决定

The technology boss is ready, and the topic of position C is up to you

树形结构数据的处理

PyTorch 卷积网络正则化 DropBlock

In 2022, 95% of the three most common misunderstandings in software testing were recruited. Are you that 5%?

可視化yolov5格式數據集(labelme json文件)

Network security - vulnerabilities and Trojans
![[fluent] hero animation (hero animation use process | create hero animation core components | create source page | create destination page | page Jump)](/img/68/65b8c0530cfdc92ba4f583b0162544.gif)
[fluent] hero animation (hero animation use process | create hero animation core components | create source page | create destination page | page Jump)

Comment communiquer avec Huawei Cloud IOT via le Protocole mqtt
随机推荐
查询商品案例-页面渲染数据
CFdiv2-Fixed Point Guessing-(区间答案二分)
stm32F407-------IIC通讯协议
How to find summer technical internship in junior year? Are you looking for a large company or a small company for technical internship?
[camera special topic] Hal layer - brief analysis of addchannel and startchannel
stm32F407-------DMA
Deep learning notes (constantly updating...)
elastic stack
Cfdiv2 fixed point guessing- (interval answer two points)
Huakaiyun (Zhiyin) | virtual host: what is a virtual host
PS remove watermark details
Ni visa fails after LabVIEW installs the third-party visa software
Machine learning notes (constantly updating...)
stm32F407-------ADC
我的创作纪念日
Su Shimin: 25 principles of work and life
Leetcode (540) -- a single element in an ordered array
[shutter] pull the navigation bar sideways (drawer component | pageview component)
【Camera专题】OTP数据如何保存在自定义节点中
Hard core observation 547 large neural network may be beginning to become aware?