当前位置:网站首页>Thread, thread stack, method stack, the difference of creating thread
Thread, thread stack, method stack, the difference of creating thread
2022-07-03 20:19:00 【Chen4852010】
1. A thread is actually a stack , Each thread has a name , For example, the main thread is called main Threads , But the name of the thread has nothing to do with the method stack in the thread
2. How to create threads ( Take the main thread as an example )
First allocate a stack space , And then press the stack ( Each thread is created , There will be a main method stack , That is, speaking of code, there must be a method stack ), This method stack is actually the same as our ordinary calling methods , They all come from the methods of classes and objects
With main Thread as an example ,jvm Distribute Main thread space , call Object's main Method ,main Method stack …, and main Resources available by methods , Now only main The object of the method attribute
Again , We create threads , First of all, there must be a class , object ( Realized runnable Interface ), Then call the api , here jvm Allocate a stack space , Push the , Of this object run Method stack , And this run Methods also come from objects , At the moment run Method You can only get Of this object attribute
To make a long story short , Everything is class and , object , Threads are stack space , In stack space Stack frame is method stack , These stack pressing processes , It's all called Class , So in the method stack Properties and methods that can be called , Can also be applied to Of classes and objects The rules
边栏推荐
- FPGA learning notes: vivado 2019.1 project creation
- [effective Objective-C] - block and grand central distribution
- 1.4 learn more about functions
- 3. Data binding
- Global and Chinese market of micro positioning technology 2022-2028: Research Report on technology, participants, trends, market size and share
- Explore the internal mechanism of modern browsers (I) (original translation)
- Basic command of IP address configuration ---ip V4
- 2022 Xinjiang latest road transportation safety officer simulation examination questions and answers
- 2.5 conversion of different data types (2)
- Network security Kali penetration learning how to get started with web penetration how to scan based on nmap
猜你喜欢

Virtual machine installation deepin system

Sightseeing - statistics of the number of shortest paths + state transfer + secondary small paths
![How to read the source code [debug and observe the source code]](/img/0d/6495c5da40ed1282803b25746a3f29.jpg)
How to read the source code [debug and observe the source code]

2.2 integer

Q&A:Transformer, Bert, ELMO, GPT, VIT

2.7 format output of values
![AI enhanced safety monitoring project [with detailed code]](/img/a9/cb93f349229e86cbb05ad196ae9553.jpg)
AI enhanced safety monitoring project [with detailed code]

IP address is such an important knowledge that it's useless to listen to a younger student?

Introduction to golang garbage collection

thrift go
随机推荐
BOC protected tryptophan porphyrin compound (TAPP Trp BOC) Pink Solid 162.8mg supply - Qiyue supply
2.4 conversion of different data types
Rad+xray vulnerability scanning tool
FPGA 学习笔记:Vivado 2019.1 工程创建
Parental delegation mechanism
Make a simple text logo with DW
Pat grade B 1009 is ironic (20 points)
Test changes in Devops mode -- learning and thinking
BOC protected tryptophan zinc porphyrin (Zn · TAPP Trp BOC) / copper porphyrin (Cu · TAPP Trp BOC) / cobalt porphyrin (cobalt · TAPP Trp BOC) / iron porphyrin (Fe · TAPP Trp BOC) / Qiyue supply
First knowledge of database
App compliance
47. Process lock & process pool & Collaboration
Shortest path problem of graph theory (acwing template)
Camera calibration (I): robot hand eye calibration
Part 28 supplement (XXVIII) busyindicator (waiting for elements)
Blue Bridge Cup: the fourth preliminary - "simulated intelligent irrigation system"
Test access criteria
About unregistered transfer login page
Sword finger offer 30 Stack containing min function
2.1 use of variables