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 565865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:55:01+00:00 2026-05-13T12:55:01+00:00

Possible Duplicate: Maximum number of threads in a .NET app? Is there a limit

  • 0

Possible Duplicate:
Maximum number of threads in a .NET app?

Is there a limit on the number of threads we can create in a .NET application ?

I am assuming that the number of threads that can be created is limited by the amount of memory available since the threads’ stack needs to be allocated. Please correct me if I am wrong. Are there other factors that limits the number of threads ? Or, is the number of threads limited to a specific number ?

How can I (roughly) calculate the maximum number of threads that can be created on a machine, if I know the machine specifications ?

  • 1 1 Answer
  • 2 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-13T12:55:02+00:00Added an answer on May 13, 2026 at 12:55 pm

    As always, Raymond Chen has the answer on his blog. Note that his test appears to have been run using unmanaged code. My guess is that there’s nothing in the .NET framework that actually limits the number of threads per process and that the limit would be enforced by the O/S. If that’s truly the case then his test is still valid.

    Also, I’m not sure if it’s different between 32-bit and 64-bit machines, I would imagine his results are dependent on RAM size and 32bit/64bit CPU along with possibly the number of CPUs. All that said, it looks like he was able to get 13000 threads created.

    The big issue with 13k threads running is that the time spent context switching is sure to eat up all the available cpu and you’re likely to be getting little to no work done.

    If the application you’re looking into is creating a lot of threads that are supposed to be doing intense work, you might not be getting a process hang as much as running into issues with the amount of context switching taking place. Obviously the most common issue in a multi-threaded application is a resource deadlock, but there are many tools available to troubleshoot that scenario.

    Try the following links about deadlocks to determine if that’s what you’re actually running into:

    • Avoiding and Detecting Deadlocks
    • Deadlock Monitor
    • Stack Overflow Deadlock Question
    • Stack Overflow Deadlock Debug Question
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Hash Function .NET hi, I should write an app that take string
Possible Duplicate: Maximum number of threads per process in Linux? just with some curiosity
Possible Duplicate: What is the Maximum Size that an Array can hold? i want
Possible Duplicate: Yield In VB.NET In C#, when writing a function that returns an
Possible Duplicate: Can a Bash script tell what directory it's stored in? Is there
Possible Duplicate: maximum length of HTTP GET request? how many characters can be sent
Possible Duplicate: How many data a list can hold at the maximum What is
Possible Duplicate: How many data a list can hold at the maximum What is
Possible Duplicate: Android - Application (apk) Maximum size I want to install an APK
Possible Duplicate: Maximum size for a SQL Server Query? IN clause? Is there a

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.