当前位置:网站首页>Six states of threads
Six states of threads
2022-06-24 10:23:00 【Ugly and ugly】
stay Java in , Threads have the following six states :
| state | explain |
|---|---|
| NEW | The initial state : Thread created , But it's not called yet start() Method |
| RUNNABLE | Running state :Java Threads refer to the ready and running states of the operating system as “ Running state ” |
| BLOCKED | Blocked state : Indicates that the thread is blocked by a lock |
| WAITING | Wait state : Indicates that the thread is waiting , Entering this state means that the current thread needs to wait for other threads to make some specific actions ( Notification or interruption ) |
| TIME_WAITING | Timeout wait status : This state is different from WAITIND, It can return by itself at a specified time |
| TERMINATED | Termination status : Indicates that the current thread has finished executing |
Threads are in their own life cycle , It's not fixed in a certain state , It's switching between different states as the code executes ,Java The following figure shows the change of thread status :

This article references from : Face slag counter attack :Java Ask , Let's see how many ways you can ! - Nuggets
边栏推荐
- Three ways to use applicationcontextinitializer
- leetCode-1823: 找出游戏的获胜者
- PHP encapsulates a file upload class (supports single file and multiple file uploads)
- JMeter接口测试工具基础 — Badboy工具
- 引擎国产化适配&重构笔记
- 411 stack and queue (20. valid parentheses, 1047. delete all adjacent duplicates in the string, 150. inverse Polish expression evaluation, 239. sliding window maximum, 347. the first k high-frequency
- Queue queue
- numpy. linspace()
- Using pandas to read SQL server data table
- Leetcode-1089: replication zero
猜你喜欢

Nvisual digital infrastructure operation management software platform

leetCode-1823: 找出游戏的获胜者

CVPR 2022 Oral | 英伟达提出自适应token的高效视觉Transformer网络A-ViT,不重要的token可以提前停止计算

How to manage massive network infrastructure?

时尚的弹出模态登录注册窗口

Juul, the American e-cigarette giant, suffered a disaster, and all products were forced off the shelves

SVG+js拖拽滑块圆形进度条

Resolved: methods with the same name as their class will not be constructors in

H5网页如何在微信中自定义分享链接

Queue queue
随机推荐
uniapp开发微信小程序,显示地图功能,且点击后打开高德或腾讯地图。
Resolved: methods with the same name as their class will not be constructors in
Internet of things? Come and see Arduino on the cloud
2022-06-23:给定一个非负数组,任意选择数字,使累加和最大且为7的倍数,返回最大累加和。 n比较大,10的5次方。 来自美团。3.26笔试。
411-栈和队列(20. 有效的括号、1047. 删除字符串中的所有相邻重复项、150. 逆波兰表达式求值、239. 滑动窗口最大值、347. 前 K 个高频元素)
线程池的状态
百度网盘下载一直请求中问题解决
Leetcode-498: diagonal traversal
Learn to use the phpstripslush function to remove backslashes
解决Deprecated: Methods with the same name as their class will not be constructors in报错方案
记录一下MySql update会锁定哪些范围的数据
如何在一个页面上使用多个KindEditor编辑器并将值传递到服务器端
24. 图像拼接大作业
Regular matching mailbox
np. float32()
解决微信小程序rich-text富文本标签内部图片宽高自适应的方法
5. dish management business development
形状变化loader加载jsjs特效代码
leetCode-929: 独特的电子邮件地址
leetCode-223: 矩形面积