CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2000
    Posts
    129

    Question What is the thread limit per process???

    Is it tru that i can't create more than 64 threads per process and is there any way to increase this number?

    Thanks for your help!

  2. #2
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537

    Re: What is the thread limit per process???

    Originally posted by olstar
    Is it tru that i can't create more than 64 threads per process and is there any way to increase this number?

    Thanks for your help!
    where does 64 play into this??

    MSDN states the limits such as under CreateThread(...) and you could always write a test program if you want to know.

    The number of threads a process can create is limited by the available virtual memory. By default, every thread has one megabyte of stack space. Therefore, you can create at most 2028 threads. If you reduce the default stack size, you can create more threads. However, your application will have better performance if you create one thread per processor and build queues of requests for which the application maintains the context information. A thread would process all requests in a queue before processing requests in the next queue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured