none
Number of threads limit in threadpool RRS feed

  • Question

  • As per an article, there is an internal limit of 25 threads which can be created in a threadpool in .net

    I need to know what is the current threads limits in a threadpool for latest .net4.0

    Cheers

    TicArch

    Wednesday, April 21, 2010 10:35 AM

Answers

  • Greetings

    Point

    • The number of operations that can be queued to the thread pool is limited only by available memory; however, the thread pool limits the number of threads that can be active in the process simultaneously. By default, the limit is 250 worker threads per CPU and 1,000 I/O completion threads.
    • You can control the maximum number of threads by using the GetMaxThreads and SetMaxThreads methods.

    Hope this helps

    Take Care

    PL


    Helping People To Solve Technical Problems
    • Marked as answer by TicArch Wednesday, April 21, 2010 3:47 PM
    Wednesday, April 21, 2010 3:24 PM

All replies

  • The thread pool is a unique shared resource per process; that is why it is impossible for an application domain to change its configuration. Imagine the consequences if a third-party component changes the maximum number of threads on the pool to 1, the entire application can stop working and even other application domains in the same process will be affected. For the same reason, systems that host the common language runtime do have the possibility to change the configuration. For example, Microsoft ASP.NET allows the Administrator to change the maximum number of threads available on the pool.

    Hope this is same for .net 4.0 too.

    Wednesday, April 21, 2010 12:42 PM
  • Greetings

    Point

    • The number of operations that can be queued to the thread pool is limited only by available memory; however, the thread pool limits the number of threads that can be active in the process simultaneously. By default, the limit is 250 worker threads per CPU and 1,000 I/O completion threads.
    • You can control the maximum number of threads by using the GetMaxThreads and SetMaxThreads methods.

    Hope this helps

    Take Care

    PL


    Helping People To Solve Technical Problems
    • Marked as answer by TicArch Wednesday, April 21, 2010 3:47 PM
    Wednesday, April 21, 2010 3:24 PM