当前位置:网站首页>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
边栏推荐
- Vscode reports an error according to the go plug-in go get connectex: a connection attempt failed because the connected party did not pro
- Pat grade B 1009 is ironic (20 points)
- Global and Chinese market of liquid antifreeze 2022-2028: Research Report on technology, participants, trends, market size and share
- 2.4 conversion of different data types
- Meso tetra [P - (p-n-carbazole benzylidene imino)] phenylporphyrin (tcipp) /eu (tcipp) [pc( α- 2-oc8h17) 4] and euh (tcipp) [pc (a-2-oc8h17) 4] supplied by Qiyue
- 1.5 learn to find mistakes first
- Network security Kali penetration learning how to get started with web penetration how to scan based on nmap
- [Yugong series] February 2022 Net architecture class 004 ABP vNext used in WPF project
- Detailed and not wordy. Share the win10 tutorial of computer reinstallation system
- Find a line in a file and remove it
猜你喜欢

Shortest path problem of graph theory (acwing template)

Gym welcomes the first complete environmental document, which makes it easier to get started with intensive learning!

Professional interpretation | how to become an SQL developer

Qtablewidget control of QT

An old programmer gave it to college students
![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]

Test changes in Devops mode -- learning and thinking

Kubernetes cluster builds efk log collection platform

Sparse matrix (triple) creation, transpose, traversal, addition, subtraction, multiplication. C implementation

44. Concurrent programming theory
随机推荐
[raid] [simple DP] mine excavation
Detailed and not wordy. Share the win10 tutorial of computer reinstallation system
Gym welcomes the first complete environmental document, which makes it easier to get started with intensive learning!
Global and Chinese market of micro positioning technology 2022-2028: Research Report on technology, participants, trends, market size and share
Acquisition and transmission of parameters in automatic testing of JMeter interface
Part 28 supplement (XXVIII) busyindicator (waiting for elements)
Global and Chinese market of rubidium standard 2022-2028: Research Report on technology, participants, trends, market size and share
Deep search DFS + wide search BFS + traversal of trees and graphs + topological sequence (template article acwing)
Fingerprint password lock based on Hal Library
Global and Chinese market of electrolyte analyzers 2022-2028: Research Report on technology, participants, trends, market size and share
unittest框架基本使用
Derivation of decision tree theory
About unregistered transfer login page
Exercises of function recursion
Oak-d raspberry pie cloud project [with detailed code]
Pat grade B 1009 is ironic (20 points)
Global and Chinese markets of active matrix LCD 2022-2028: Research Report on technology, participants, trends, market size and share
Test access criteria
Use of aggregate functions
Nacos usage of micro services