
- C# Basic Tutorial
- C# - Home
- C# - Overview
- C# - Environment
- C# - Program Structure
- C# - Basic Syntax
- C# - Data Types
- C# - Type Conversion
- C# - Variables
- C# - Constants
- C# - Operators
- C# - Decision Making
- C# - Loops
- C# - Encapsulation
- C# - Methods
- C# - Nullables
- C# - Arrays
- C# - Strings
- C# - Structure
- C# - Enums
- C# - Classes
- C# - Inheritance
- C# - Polymorphism
- C# - Operator Overloading
- C# - Interfaces
- C# - Namespaces
- C# - Preprocessor Directives
- C# - Regular Expressions
- C# - Exception Handling
- C# - File I/O
- C# Advanced Tutorial
- C# - Attributes
- C# - Reflection
- C# - Properties
- C# - Indexers
- C# - Delegates
- C# - Events
- C# - Collections
- C# - Generics
- C# - Anonymous Methods
- C# - Unsafe Codes
- C# - Multithreading
- C# Useful Resources
- C# - Questions and Answers
- C# - Quick Guide
- C# - Useful Resources
- C# - Discussion
Lifecycle and States of a Thread in C#
Threads are lightweight processes. Each thread defines a unique flow of control. The life cycle of a thread starts when an object of the System.Threading.Thread class is created and ends when the thread is terminated or completes execution.
Here are the various states in the life cycle of a thread −
The Unstarted State
It is the situation when the instance of the thread is created but the Start method is not called.
The Ready State
It is the situation when the thread is ready to run and waiting CPU cycle.
The Not Runnable State
- A thread is not executable, when
- Sleep method has been called
- Wait method has been called
- Blocked by I/O operations
The Dead State
It is the situation when the thread completes execution or is aborted.
- Related Articles
- Lifecycle and states of thread in java
- Thread life cycle and its states in Ruby
- Lifecycle of a Bot
- Please explain lifecycle of a JSP
- How Is A Lifecycle Of Silkworm??
- RPA Lifecycle in Blue Prism
- Understanding the Node lifecycle and event loop in node.js
- How a thread can interrupt another thread in Java?
- Mind: Nature, States and Functions
- How to get the lifecycle of a S3 bucket using Boto3 and AWS Client?
- Explain the stages and their examples of database development lifecycle (DBMS)?
- React.js Component Lifecycle - Unmounting
- What are the lifecycle of security metrics?
- Difference between Fixed thread pool and cached thread pool.
- State the worst case number of states in DFA and NFA for a language?

Advertisements