A thread controls the flow of an executable program. By default, a program has one thread called Main Thread. Main Thread starts when control enters in the Main method and it terminates when Main method returns.
A thread can be created by using System.Threading.Thread class. A thread can only be manipulated on a
method. For example, MainThread needs a Main method to control the flow of a progam.
In a C# progarm, a thread can be found in any of the following states:
States of a Thread
System.Threading.Thread class contains the following common methods and properties, which are
helpful for managing a thread.
Common Methods and Properties of Thread Class
If the execution of a program is controlled by more than one thread, it’s called a Multithreaded
Application. Such a program increases the performance and response time of an application. In C#, the System.Threading namespace is used for creating and managing thread(s) in a multithreaded application.A thread can be created by using System.Threading.Thread class. A thread can only be manipulated on a
method. For example, MainThread needs a Main method to control the flow of a progam.
In a C# progarm, a thread can be found in any of the following states:
States of a Thread
System.Threading.Thread class contains the following common methods and properties, which are
helpful for managing a thread.
Common Methods and Properties of Thread Class
Comments
Post a Comment