当前位置:网站首页>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
边栏推荐
- Q&A:Transformer, Bert, ELMO, GPT, VIT
- Change deepin to Alibaba image source
- AST (Abstract Syntax Tree)
- jvm jni 及 pvm pybind11 大批量数据传输及优化
- 4. Data splitting of Flink real-time project
- JMeter plug-in installation
- BOC protected phenylalanine zinc porphyrin (Zn · TAPP Phe BOC) / iron porphyrin (Fe · TAPP Phe BOC) / nickel porphyrin (Ni · TAPP Phe BOC) / manganese porphyrin (Mn · TAPP Phe BOC) Qiyue Keke
- Recommendation of books related to strong foundation program mathematics
- Camera calibration (I): robot hand eye calibration
- LabVIEW training
猜你喜欢
Cesiumjs 2022 ^ source code interpretation [7] - Analysis of the request and loading process of 3dfiles
Qtablewidget control of QT
1.4 learn more about functions
2.4 conversion of different data types
AcWing 1460. Where am i?
Battle drag method 1: moderately optimistic, build self-confidence (1)
Gym welcomes the first complete environmental document, which makes it easier to get started with intensive learning!
Today's work summary and plan: February 14, 2022
Don't be afraid of no foundation. Zero foundation doesn't need any technology to reinstall the computer system
Sightseeing - statistics of the number of shortest paths + state transfer + secondary small paths
随机推荐
Global and Chinese market of electrolyte analyzers 2022-2028: Research Report on technology, participants, trends, market size and share
Instructions for common methods of regular expressions
Cesiumjs 2022 ^ source code interpretation [7] - Analysis of the request and loading process of 3dfiles
Global and Chinese markets of polyimide tubes for electronics 2022-2028: Research Report on technology, participants, trends, market size and share
11-grom-v2-04-advanced query
BOC protected phenylalanine zinc porphyrin (Zn · TAPP Phe BOC) / iron porphyrin (Fe · TAPP Phe BOC) / nickel porphyrin (Ni · TAPP Phe BOC) / manganese porphyrin (Mn · TAPP Phe BOC) Qiyue Keke
BOC protected alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC supplied by Qiyu
LabVIEW training
Change deepin to Alibaba image source
An old programmer gave it to college students
Microsoft: the 12th generation core processor needs to be upgraded to win11 to give full play to its maximum performance
Q&A:Transformer, Bert, ELMO, GPT, VIT
Popularize the basics of IP routing
1.4 learn more about functions
2.1 use of variables
Micro service knowledge sorting - three pieces of micro Service Technology
Class loading process
FAQs for datawhale learning!
4. Data splitting of Flink real-time project
6. Data agent object Defineproperty method