473,377 Members | 1,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,377 software developers and data experts.

Number of threads in a .Net Application

I create a test app in C# as below:

using System
namespace Test1
{
class Test2
{
static void Main()
{
Console.ReadLine();
}
}
}

When I compile and run this app, I see this "tiny" app, running 4 threads.
Accounting one for the garbage collector, what are the other two threads and
what are their functions?

-vJ
Nov 16 '05 #1
2 5321
Hi Vijaye,

Even that little tiny application requires .NET runtime in order to work.
CLR is not as tiny as your sample and I'm not surprised that it runs 3
threads. On my machine the threads are three not four if it could be any
consolation :) .

--

Stoitcho Goutsev (100) [C# MVP]
"Vijaye Raji" <no*************@hotmail.com> wrote in message
news:eb**************@tk2msftngp13.phx.gbl...
I create a test app in C# as below:

using System
namespace Test1
{
class Test2
{
static void Main()
{
Console.ReadLine();
}
}
}

When I compile and run this app, I see this "tiny" app, running 4 threads.
Accounting one for the garbage collector, what are the other two threads and what are their functions?

-vJ

Nov 16 '05 #2
1. Unmanaged thread used to load/run/unload the CLR .
2. Managed thread running Main() in a default domain.
3. Managed Finalizer thread.
4. Unmanaged Debugger thread (optional).

Willy.

"Vijaye Raji" <no*************@hotmail.com> wrote in message
news:eb**************@tk2msftngp13.phx.gbl...
I create a test app in C# as below:

using System
namespace Test1
{
class Test2
{
static void Main()
{
Console.ReadLine();
}
}
}

When I compile and run this app, I see this "tiny" app, running 4 threads.
Accounting one for the garbage collector, what are the other two threads
and what are their functions?

-vJ

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tzach | last post by:
I'm developing a simple Java client that runs over a CORBA server. The main client thread is waiting for notification from this server. On each notification, The client creates a new thread...
3
by: Ronan Viernes | last post by:
Hi, I have created a python script (see below) to count the maximum number of threads per process (by starting new threads continuously until it breaks). ###### #testThread.py import...
1
by: Hype | last post by:
When a query gets executed as parallel threads, how can we ascertain how many threads have been created for the query ? TIA Hype.
1
by: Paul Fi | last post by:
I have some confusions about the two, is it possible to create threads inside a particular domain and have other threads created in another domain or do we create threads that will manipulate app...
1
by: Novice | last post by:
Hi all, I have written some code that invokes a method a few hundred times and then it immediately finishes. I would like it to instead: 1. start the hundreds of threads (asynchronously) 2....
1
by: Dominic | last post by:
I'd like to tune the performance of my application in a web garden. Our server has dual processors. Is there any guideline to set this "maximum number of worker processes" for web garden? In my...
2
by: Tumurbaatar S. | last post by:
ASP.NET QuickStart Tutorial says that: .... ASP.NET maintains a pool of HttpApplication instances over the course of a Web application's lifetime. ASP.NET automatically assigns one of these...
4
by: MSDousti | last post by:
Hi I have written a VB .NET app, which uses several threads. I thought that when the user closes the main window (when MainForm.closed event occures, and I call application.exit) all running...
10
by: HK | last post by:
With VB.NET 2005, and a Windows Form, running on a dual CPU box, I need to take a recordset (e.g. 100,000 records) and spawn a thread to handle an internet XML transaction routine for each of the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.