"Edward Diener" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Is there an operating system limit to the number of threads in a process ?
No. The limiting factor usually turns out to be memory. Every thread by
_default_ gets a 1MB stack. Sooner or later you run out of contiguous
virtual address space.
I am surprised though that you hit the wall at 105. I have seen native
programs can several hundred more threads before giving up the ghost. I
haven't seen any reports about likely limits under .Net
<aside>
That said, where high performance is required, it is rarely a good idea to
have so many threads if all of them can compete for the processor. On the
native side of things, a thread pool and an I/O completion port scale
better.
</aside>
Regards,
Will
|