Thread Life Cycle in ASP .NET
Thread Life Cycle:
Creating: In this step, it is required for creating a thread which is created an object of [c]System.Threading[/c].
Executing: After creating a thread Start() method of class System.Threading. A thread is used to execute a thread without waiting for another thread to complete.
Pausing: We use [c]Thread.Sleep[/c] method to pause a running thread for a specified time.
Cancelling: We need to cancel running thread, we use System.Threading. Abort() method to cancel a running thread.
Methods for Thread Class:
1. Start(): It is used to start a thread.
2. Sleep(): It is used to pause a running thread for a specified time.
3. Abort(): It is used to stop a thread when it is at a safe point.
4. Suspend(): It is used to restart a suspended thread.
5. Join(): It is used to bring the current thread to the waiting position until the previously started thread is completed.