当前位置:网站首页>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 ;
边栏推荐
- Structure de l'arbre - - - arbre binaire 2 traversée non récursive
- Clickhouse: Test on query speed of A-share minute data [Part 2]
- Wechat applet WebView prohibits page scrolling without affecting the implementation of overflow scrolling in the business
- 微信小程序 webview 禁止页面滚动,同时又不影响业务内overflow的滚动的实现方式
- JS variable lifting
- Implementation and application of queue
- NoSQL数据库的安装和使用
- 【pytorch】nn. AdaptiveMaxPool2d
- JS use toString to distinguish between object and array
- [pytorch] 2.4 convolution function nn conv2d
猜你喜欢
[interview brush 101] linked list
2.3 【pytorch】数据预处理 torchvision.datasets.ImageFolder
Tree structure -- binary tree 2 non recursive traversal
【pytorch】nn. Crossentropyloss() and nn NLLLoss()
Vsync+ triple cache mechanism +choreographer
Microcomputer principle - bus and its formation
Understanding and implementation of AVL tree
【pytorch】2.4 卷积函数 nn.conv2d
nacos簡易實現負載均衡
【pytorch】softmax函数
随机推荐
JS use toString to distinguish between object and array
Summary of reptile knowledge points
短路运算符惰性求值
[ESP nanny level tutorial] crazy completion chapter - Case: temperature and humidity monitoring system based on Alibaba cloud, applet and Arduino
2.3 [kaggle dataset - dog feed example] data preprocessing, rewriting dataset, dataloader reading data
Record a redis timeout
FAQ | FAQ for building applications for large screen devices
PHP array functions (merge, split, append, find, delete, etc.)
Installation and use of NoSQL database
Tree structure -- binary tree 2 non recursive traversal
【ESP 保姆级教程 预告】疯狂Node.js服务器篇 ——案例:ESP8266 + MQ系列 + NodeJs本地服务 + MySql存储
[ESP nanny level tutorial] crazy completion chapter - Case: gy906 infrared temperature measurement access card swiping system based on the Internet of things
Weidongshan board compilation kernel problem solving
JS scope chain and closure
js 使用toString 区分Object、Array
Microcomputer principle - bus and its formation
Implementation and application of queue
【pytorch】transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
SQL学习笔记(01)——数据库基本知识
2.4 activation function