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

  • Home
  • SEARCH
  • 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 681463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:29:11+00:00 2026-05-14T01:29:11+00:00

I have an application which performs 30 independent tasks simultaneously using multithreading, each task

  • 0

I have an application which performs 30 independent tasks simultaneously using multithreading,
each task retrieves data over http, performs a calculation and returns a result to the ui thread.

Can I use TPL to perform the same tasks?

Does TPL create 30 new threads and spread them over all the available cores, or does it just split the tasks over the available cores and use one thread per core?

Will there be a performance boost using TPL over multithreading in this case?

  • 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-14T01:29:11+00:00Added an answer on May 14, 2026 at 1:29 am

    I believe TPL will usually use one thread per core unless you specifically tell it to use more. It’s possible that it will detect when that’s not enough – e.g. in your case, where your tasks are going to spend most of their time waiting for data.

    Is there any reason you can’t use asynchronous web fetching? I suspect there’s no need to have a thread per task or even a thread per core here. TPL makes various aspects of asynchronous programming easier, with things like continuations.

    In terms of efficiency, is your application actually CPU bound? It sounds like you need to be getting the maximum appropriate level of parallelism at the network side – that’s the bit to concentrate on, unless the calculations are really heavyweight.


    UPDATES – NOT FROM ORIGINAL AUTHOR

    The answer above is great as always but could be misleading as it does not have some important changes in .NET 4.0 CLR.

    As Andras says, current TPL implementation uses the thread pool hence will use as many threads as required (number of cores is irrelevant now):

    The Task Parallel Library (TPL) is a collection of new classes
    specifically designed to make it easier and more efficient to execute
    very fine-grained parallel workloads on modern hardware. TPL has been
    available separately as a CTP for some time now, and was included in
    the Visual Studio 2010 CTP, but in those releases it was built on its
    own dedicated work scheduler. For Beta 1 of CLR 4.0, the default
    scheduler for TPL will be the CLR thread pool, which allows TPL-style
    workloads to “play nice” with existing, QUWI-based code, and allows us
    to reuse much of the underlying technology in the thread pool – in
    particular, the thread-injection algorithm, which we will discuss in a
    future post.

    From:

    Link

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

Sidebar

Ask A Question

Stats

  • Questions 428k
  • Answers 428k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The process will be java.exe You can use one of… May 15, 2026 at 1:20 pm
  • Editorial Team
    Editorial Team added an answer Packed is smaller but is slower. And even harder to… May 15, 2026 at 1:20 pm
  • Editorial Team
    Editorial Team added an answer It have been long since i posted this question. May… May 15, 2026 at 1:20 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.