Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6899717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:27:25+00:00 2026-05-27T07:27:25+00:00

I was reading around and read that if I use Tasks instead of Threads

  • 0

I was reading around and read that if I use Tasks instead of Threads in .Net they would not be susceptible to Context Switches that Threads have issues with.

However reading around I also noticed that Tasks just use Threads under the covers anyway.

So I am a bit confused, any clarification is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:27:26+00:00Added an answer on May 27, 2026 at 7:27 am

    What you’ve read is wrong.

    Task is part of the TPL. The TPL uses a more advanced scheduler, than the CLR’s threadpool. An example is that the TPL scheduler uses WorkStealingQueues.

    A few facts:

    • Whether you do Task.Factory.StartNew, or ThreadPool.QueueUserWorkItem, both will use the same threadpool (.NET 4.0)
    • Whether you use a Task or “raw” Threads, each timeslice will cause a context switch.
    • Also if a higher priority thread becomes runnable it will cause a context switch.
    • A Task will cause just as many context switches as a regular thread.

    Note that a context switch, only occurs if there aren’t enough processors to handle the threads simultaneously.

    Some links to check out:

    • Difference between TPL and Threadpool, and the change threadpool in .NET 4.0:
      http://www.danielmoth.com/Blog/New-And-Improved-CLR-4-Thread-Pool-Engine.aspx

    • Shows how to implement a WorkStealingQueue in C#:
      http://www.bluebytesoftware.com/blog/2008/08/12/BuildingACustomThreadPoolSeriesPart2AWorkStealingQueue.aspx

    • A short version of daniel moth’s blog post:
      http://blogs.msdn.com/b/jennifer/archive/2009/06/26/work-stealing-in-net-4-0.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having read an existing post on stackoverflow and done some reading around on the
From reading here and around the net, I'm close to assuming the answer is
I have been reading other questions and answers around this but I am not
I'm reading some data for countries around the world and am playing with Google's
I'm reading a local file using a BufferedReader wrapped around a FileReader: BufferedReader reader
Just trying to get my head around Generics by reading this enlightening article by
I've read a few other questions that seem similar but I'm still very confused,
I've been toying around with libevent2, and I've got reading files working, but it
i have built a solution around google maps api but realized that it doesn't
I would like to be able to dynamically read and write audio data in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.