Differentiate between Task and Thread in .NET?

Forums .NET CoreDifferentiate between Task and Thread in .NET?
Staff asked 4 weeks ago

Differentiate between Task and Thread in .NET?

Answers (1)

Add Answer
Parth Mandaliya Marked As Accepted
Staff answered 4 weeks ago
  • The thread represents an actual OS-level thread, with its own stack and kernel resources, and allows the highest degree of control.
  • You can choose to Abort() or Suspend() or Resume() a thread, and set thread-level properties, like the stack size, apartment state, or culture.
  • While a Task class from the Task Parallel Library is executed by a Task Scheduler to return a result and allows you to find out when it finishes.

Subscribe

Select Categories