当前位置:网站首页>thread priority
thread priority
2022-06-26 05:07:00 【Light ink CGZ】
/** * Observe the thread state */
public class Allstate{
public static viod main(String[] args){
Thread t = new Thread(()->{
System.out.println("……");
})
// Observation state
State state = t.getState();
System.out.println(state);//NEW
}
}
State of thread , Five states : Can pass state see .
Thread priority :
Range from 1 To 10
Thread.MIN_PRIORITY = 1
Thread.MAX_PRIORITY = 10
Thread.NORM_PRIORITY = 5
Use setPriority(int newPriority);
getPriority();
get , And setting priorities ;
Setting recommendations in start() Before calling .
Be careful : Priority knowledge means that the probability of scheduling is low . It is not absolutely first to call high priority first .
边栏推荐
- Cookie and session Basics
- Image translation /gan:unsupervised image-to-image translation with self attention networks
- Implementation of IM message delivery guarantee mechanism (II): ensure reliable delivery of offline messages
- Introduction to classification data cotegory and properties and methods of common APIs
- Transport layer TCP protocol and UDP protocol
- Multipass Chinese document - share data with instances
- Use to_ Numeric to numeric type
- Create a binary response variable using the cut sub box operation
- 关于支付接口回调地址参数字段是“notify_url”,签名过后的特殊字符url编码以后再解码后出现错误(¬ , ¢, ¤, £)
- Tp5.0框架 PDO连接mysql 报错:Too many connections 解决方法
猜你喜欢

LeetCode 19. Delete the penultimate node of the linked list

ECCV 2020 double champion team, take you to conquer target detection on the 7th

PHP二维/多维数组按照指定的键值来进行升序和降序

5. < tag stack and general problems > supplement: lt.946 Verify the stack sequence (the same as the push in and pop-up sequence of offer 31. stack)

Beidou navigation technology and industrial application of "chasing dreams in space and feeling for Beidou"

A company crawling out of its grave

百度API地图的标注不是居中显示,而是显示在左上角是怎么回事?已解决!

What is UWB in ultra-high precision positioning system

Zuul 实现动态路由

Classic theory: detailed explanation of three handshakes and four waves of TCP protocol
随机推荐
Codeforces Round #802 (Div. 2)(A-D)
First day of deep learning and tensorflow learning
递归遍历目录结构和树状展现
apktool 工具使用文档
《财富自由之路》读书之一点体会
Multipass Chinese document - remote use of multipass
Use fill and fill in Matplotlib_ Between fill the blank area between functions
5. < tag stack and general problems > supplement: lt.946 Verify the stack sequence (the same as the push in and pop-up sequence of offer 31. stack)
FastAdmin Apache下设置伪静态
Second day of deep learning and tensorfow
The best Chinese open source class of vision transformer, ten hours of on-site coding to play with the popular model of Vit!
Selection of programming language
微信小程序保存圖片的方法
A method of quickly transplanting library function code to register code by single chip microcomputer
Beidou navigation technology and industrial application of "chasing dreams in space and feeling for Beidou"
Using requests library and re library to crawl web pages
2022.2.17
Multipass Chinese documents - improve mount performance
ThreadPoolExecutor实现文件上传批量插入数据
6.1 - 6.2 Introduction à la cryptographie à clé publique