In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you "how many threads a .NET program starts when it is running". It is easy to understand and well-organized. I hope it can help you solve your doubts. Let me lead you to study and learn the article "how many threads are started when a .NET program is running?"
Q: how many threads does a .NET program start when it is running?
A: at least three.
1. The main thread that starts CLR and runs the Main method
two。 Debugger help thread
3.Finalizer thread
The copy code is as follows:
Class Program
{
Static void Main (string [] args)
{
Console.WriteLine ("Main thread: {0}"
Thread.CurrentThread.ManagedThreadId)
Console.ReadKey ()
}
}
Typically, CLR starts more special threads as appropriate.
Finalizer thread: this thread is responsible for running GC for garbage collection.
Concurrent GC threads: GC starts more threads concurrently for garbage collection as appropriate.
Server GC threads: in server GC mode, CLR may create GC managed heaps and recycling threads for each core of a multicore machine.
Debugger help thread: this thread is responsible for providing help to debuggers such as WinDbg.
AppDomain uninstall thread: CLR may start a worker thread to unload the application domain.
ThreadPool ThreadPool threads: ThreadPool creates threads as appropriate.
These are all the contents of the article "how many threads does a .NET program start when it is running?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.