当前位置:网站首页>122. Thread class thread method summary; Why is the thread start method start () not run ()?
122. Thread class thread method summary; Why is the thread start method start () not run ()?
2022-07-01 09:28:00 【Hip hop geek】
Thread Class thread method summary
<1> currentThread Get the current thread object ;
<2>getName Get the name of the thread ;
<3>setName Set thread ;
<4>getId Get threaded ID Uniqueness , Automatic system assignment ;
<5>setDaemon Set whether it is a background thread ;
<6>isDaemon Whether the thread is a background thread ;
<7>setPriority set priority ;
<8>getPriority Get priority ;
<9>start Start thread , Note that thread startup must use start Method ;
<10>isAlive Verify that the thread is active ;
<11>isInterrupted Whether the thread has been interrupted ;
<12>join Join in 、 Merge ;
<13>yield Comity ;
<14>interrupt Interrupt threads ;
<15>sleep sleep ;
Why is the thread startup method start() No run()?
start() After method , The state of the thread will switch to Ready state , Can participate cpu Assigned by ; and run Method , Manual call , Not at all Thread mechanism ; But ordinary object method calls , At this time, the sub thread is not working ;
边栏推荐
- 树结构---二叉树1
- Day06 branch structure and cycle (III)
- Leetcode daily question brushing record --540 A single element in an ordered array
- Structure de l'arbre - - - arbre binaire 2 traversée non récursive
- Can diffusion models be regarded as an autoencoder?
- Key points of NFT supervision and overseas policies
- 手指点击屏幕就模拟进入F11进入全屏
- ES6-const本质与完全不可改实现(Object.freeze)
- 【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于阿里云、小程序、Arduino的温湿度监控系统
- Network counting 01 physical layer
猜你喜欢
Preparing for the Blue Bridge Cup -- bit operation
Structure de l'arbre - - - arbre binaire 2 traversée non récursive
OSPF - virtual link details (including configuration commands)
Error org apache. catalina. core. StandardContext. FilterStart start filter exception
delete和delete[]引发的问题
nacos简易实现负载均衡
I use flask to write the website "one"
Imitation of Baidu search results top navigation bar effect
2.3 [pytorch] data preprocessing torchvision datasets. ImageFolder
Design and manufacture of simple digital display electronic scale
随机推荐
Clickhouse: Test on query speed of A-share minute data [Part 2]
Dspic30f6014a LCD block display
Closure implementation iterator effect
The jar package embedded with SQLite database is deployed by changing directories on the same machine, and the newly added database records are gone
Preparing for the Blue Bridge Cup -- bit operation
Weidongshan board compilation kernel problem solving
es6-顶层对象与window的脱钩
js原型陷阱
SDN_简单总结
队列的实现和应用
Mysql8.0 learning record 17 -create table
Tree structure -- binary tree 2 non recursive traversal
[ESP nanny level tutorial] crazy completion chapter - Case: gy906 infrared temperature measurement access card swiping system based on the Internet of things
js 使用toString 区分Object、Array
【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于阿里云、小程序、Arduino的温湿度监控系统
[ESP nanny level tutorial preview] crazy node JS server - Case: esp8266 + DHT11 +nodejs local service + MySQL database
富文本实现插值
【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于阿里云和Arduino的化学环境系统检测,支持钉钉机器人告警
Principles of Microcomputer - Introduction
ES6 decoupling top-level objects from windows