Maximum number of threads

G

Guest

What is the maximum number of threads Windows supports (for all processes),
and what's the maximum number of threads available per process?
Thanks.
 
P

Patrice

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...
 
C

Chris Mullins

Amir Shitrit said:
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.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top