当前位置:网站首页>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
边栏推荐
- oracle池式连接请求超时问题排查步骤
- tf.errors
- 大中型企业如何构建自己的监控体系
- Regular matching mailbox
- Juul, the American e-cigarette giant, suffered a disaster, and all products were forced off the shelves
- 5. dish management business development
- Troubleshooting steps for Oracle pool connection request timeout
- leetCode-1051: 高度检查器
- [input method] so far, there are so many Chinese character input methods!
- How to manage massive network infrastructure?
猜你喜欢

Phpstrom code formatting settings

numpy. linspace()

Internet of things? Come and see Arduino on the cloud

Getting user information for applet learning (getuserprofile and getUserInfo)

植物生长h5动画js特效

线程的 sleep() 方法与 wait() 方法的区别

Uniapp develops a wechat applet to display the map function, and click it to open Gaode or Tencent map.

canvas无限扫描js特效代码

Role of message queuing

Record the range of data that MySQL update will lock
随机推荐
SQL Server AVG函数取整问题
np. float32()
dedecms模板文件讲解以及首页标签替换
Engine localization adaptation & Reconstruction notes
消息队列的作用
Wechat applet learning to achieve list rendering and conditional rendering
tf. errors
Regular matching mobile number
微信小程序rich-text图片宽高自适应的方法介绍(rich-text富文本)
Uniapp develops a wechat applet to display the map function, and click it to open Gaode or Tencent map.
SQL Sever关于like操作符(包括字段数据自动填充空格问题)
时尚的弹出模态登录注册窗口
How can I solve the problem that the swiper animation animation fails when switching between left and right rotations of the swiper?
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
413 binary tree Foundation
Network of test and development - Common Service Protocols
leetCode-面试题 01.05: 一次编辑
Juul, the American e-cigarette giant, suffered a disaster, and all products were forced off the shelves
SQL Server AVG function rounding
牛客-TOP101-BM28