While developing a project in ASP.NET there are situations where you need to make your task multi-threaded to run in the background or in the foreground.
For ex : If your application is sending notification after each day you need to create a thread for that it will work in the background.
Life Cycle of a thread:
The Unstarted State : In this state start method will not be called but the instance of the thread will be built.
The Ready State : In this state the thread will be ready for execution and waiting for CPU cycle.
The Not Runnable State : a thread is not runnable, when:
Sleep method has been called
Wait method has been called
Blocked by I/O operations
The Dead State : It is a situation when the thread has already completed execution or it has been aborted.
0 Comment(s)