当前位置:网站首页>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
边栏推荐
- Class loading process
- Example of peanut shell inner net penetration
- 11-grom-v2-05-initialization
- [effective Objective-C] - block and grand central distribution
- 4. Data binding
- Leetcode daily question solution: 540 A single element in an ordered array
- JMeter plug-in installation
- The simplicity of laravel
- Use of CMD command
- 47. Process lock & process pool & Collaboration
猜你喜欢

How to improve data security by renting servers in Hong Kong

Battle drag method 1: moderately optimistic, build self-confidence (1)

LabVIEW training

BOC protected alanine porphyrin compound TAPP ala BOC BOC BOC protected phenylalanine porphyrin compound TAPP Phe BOC Qi Yue supply

Geek Daily: the system of monitoring employees' turnover intention has been deeply convinced off the shelves; The meta universe app of wechat and QQ was actively removed from the shelves; IntelliJ pla

Camera calibration (I): robot hand eye calibration

Kubernetes cluster builds efk log collection platform

jvm jni 及 pvm pybind11 大批量数据传输及优化

Nerfplusplus parameter format sorting

2.4 conversion of different data types
随机推荐
Global and Chinese markets of polyimide tubes for electronics 2022-2028: Research Report on technology, participants, trends, market size and share
4. Data binding
Phpexcel import export
6006. Take out the minimum number of magic beans
2.3 other data types
Basic command of IP address configuration ---ip V4
PR notes:
Geek Daily: the system of monitoring employees' turnover intention has been deeply convinced off the shelves; The meta universe app of wechat and QQ was actively removed from the shelves; IntelliJ pla
7. Data broker presentation
Global and Chinese markets of lithium chloride 2022-2028: Research Report on technology, participants, trends, market size and share
Detailed and not wordy. Share the win10 tutorial of computer reinstallation system
2.7 format output of values
unittest框架基本使用
Global and Chinese market of high purity copper foil 2022-2028: Research Report on technology, participants, trends, market size and share
Realize user registration and login
Task of gradle learning
2166. Design bit set
Part 28 supplement (XXVIII) busyindicator (waiting for elements)
It is discussed that the success of Vit lies not in attention. Shiftvit uses the precision of swing transformer to outperform the speed of RESNET
Nacos usage of micro services