469,573 Members | 1,685 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,573 developers. It's quick & easy.

Maximum number of threads

What is the maximum number of threads Windows supports (for all processes),
and what's the maximum number of threads available per process?
Thanks.
Sep 19 '06 #1
4 6682
AFAIK there is nothing hardcoded, it depends on resources you'll exhaust...
Also I've seen once that this question is considered as pointing to a design
problem as you should create as few threads as possible to get the job
done...

--
Patrice

"Amir Shitrit" <Am*********@discussions.microsoft.coma écrit dans le
message de news: 6D**********************************@microsoft.com...
What is the maximum number of threads Windows supports (for all
processes),
and what's the maximum number of threads available per process?
Thanks.

Sep 19 '06 #2
I found the article I saw once at :
http://msdn.microsoft.com/msdnmag/is...urrentAffairs/

--
Patrice

"Patrice" <sc****@chez.coma écrit dans le message de news:
%2****************@TK2MSFTNGP05.phx.gbl...
AFAIK there is nothing hardcoded, it depends on resources you'll
exhaust... Also I've seen once that this question is considered as
pointing to a design problem as you should create as few threads as
possible to get the job done...

--
Patrice

"Amir Shitrit" <Am*********@discussions.microsoft.coma écrit dans le
message de news: 6D**********************************@microsoft.com...
>What is the maximum number of threads Windows supports (for all
processes),
and what's the maximum number of threads available per process?
Thanks.


Sep 19 '06 #3
"Amir Shitrit" <Am*********@discussions.microsoft.comwrote:
What is the maximum number of threads Windows supports (for all
processes),
and what's the maximum number of threads available per process?
The short answers is: Lots. Tens of Thousands of threads can be created. If
you have a big enough machine (and today's 64-bit hardware can get very,
very big) you can have lots and lots of threads.

The longer answer is: If you're asking this question, you may want to
rethink your design. Creating more than "a few" threads almost always
indicates a design flaw of some sort. Can you explain the problem you're
trying to solve? I know you're pretty new to writing threaded code, so just
describe the problem you're trying to solve, and see if people here can come
up with a cleaner approach.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins
Sep 20 '06 #4
Actually, I'm very experienced in writing multi-threaded applications and I'm
aware of the things you said.
The reason I'm asking these questions is because I'm preparing a
presentation about the subject, and I thought it would be nice to have these
answers if I'm asked about them.

"Chris Mullins" wrote:
"Amir Shitrit" <Am*********@discussions.microsoft.comwrote:
What is the maximum number of threads Windows supports (for all
processes),
and what's the maximum number of threads available per process?

The short answers is: Lots. Tens of Thousands of threads can be created. If
you have a big enough machine (and today's 64-bit hardware can get very,
very big) you can have lots and lots of threads.

The longer answer is: If you're asking this question, you may want to
rethink your design. Creating more than "a few" threads almost always
indicates a design flaw of some sort. Can you explain the problem you're
trying to solve? I know you're pretty new to writing threaded code, so just
describe the problem you're trying to solve, and see if people here can come
up with a cleaner approach.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins
Sep 20 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Tzach | last post: by
6 posts views Thread by Kirby Angell | last post: by
2 posts views Thread by Kums | last post: by
3 posts views Thread by Raghu Rudra | last post: by
12 posts views Thread by Paul Sijben | last post: by
6 posts views Thread by =?Utf-8?B?U2hhcm9u?= | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.