当前位置:网站首页>02 review multithreading
02 review multithreading
2022-07-18 18:43:00 【Casey·Hu】
Threads have several States ?
public enum State {
// Freshmen
NEW,
// function
RUNNABLE,
// Blocking
BLOCKED,
// wait for , Death etc.
WAITING,
// Overtime waiting , It's overdue
TIMED_WAITING,
// End
TERMINATED;
}
Thread Inside State Enumeration types are 6 Kind of
wait/sleep The difference between
1. From different classes
wait=>Object
sleep=>Thread
2. About the release of the lock
wait Can release the lock
sleep It won't release the lock
3. The scope of use is different
sleep You can sleep anywhere
wait You have to synchronize the code block
4. Whether you need to catch exceptions
wait No need to catch exceptions
sleep You have to catch exceptions
3、Lock lock ( a key )
边栏推荐
- STM32 - timer interrupt experiment
- Talk about promise
- 【Ucos-III源码分析】——信号量
- Error :Could not decode ... With “UTF-8“-encoding. Editing not possible
- 【Ucos-III源码分析】——等待多个内核对象
- MySQL 触发器
- Typora更换MarkText,Mark Text下载,MarkText调出工具栏和大纲栏、设置文本编辑区宽度、编辑快捷键。
- WordPress personal blog theme wp-reason-v1.0
- 不知道如何提高视觉语言大模型?浙大与联汇研究院提出新型多维度评测框架...
- 移掉K位数字[贪心思想 & 单调栈实现]
猜你喜欢
![ERROR: Could not install packages due to an OSError: [ Errno 2] No such file or directory: ***](/img/81/6f9b7d554e6a47e614107c799229d2.png)
ERROR: Could not install packages due to an OSError: [ Errno 2] No such file or directory: ***

第七次笔记:程序的机器级代码表示

耐克,体育运动龙头在消费复苏趋势中的“红与黑”

C#-线程的加入 进度条加载案例,第一次视频效果的加入啦

mysql ibd文件反删除恢复之后异常处理----惜分飞

Idea installation, configuration, testing

动态内存管理(C语言)详细总结

云原生(三十五) | Prometheus入门和安装

Upupwank teak peel installation SSL certificate Guide

离线安装:如何搭建安全的企业级Harbor服务?内容太过详细。
随机推荐
聊一聊Promise
对象序列化流与反序列化流
Leetcode45. 跳跃游戏 II
字典树leetcode.745
如何描述变量:存储类、生命周期,作用域、链接属性
图扑软件构建源网荷储用体系 打造循环经济2.0版本
移掉K位数字[贪心思想 & 单调栈实现]
【毕业设计】基于情感分析的网络舆情热点分析系统
Pytoch build network details summary
字节三面终上岸,这份热腾腾的面经,请收好「含免费资料」
S7-200smart case analysis - motion control programming (II)
一文详解图像中的无监督学习
MySQL super detailed installation tutorial will teach you to install Mysql to use the simplest MySQL installation method of MySQL. This method is also simple to install and uninstall
空间属性概述 C语言
web开发从入门到精通一(详细)
深圳某游戏研发公司给每个工位都装监控,网友:堪比坐牢!
MySQL 变量、流程控制与游标
STM32 - timer interrupt experiment
About STM32 driving LCD display screen, the solution to the problem that the white screen and disordered code need to be powered on and reset to return to normal after the program is downloaded
危化品企业双重预防机制数字化系统怎样建?