• C

Threads - influencing the number that may be created

I have a general question concerning the creation of threads.  Is there a way to tweak the compiler
settings to influence the number of threads that may be produced by a given program?  If so,
can someone explain to me how I may go about doing this.  I am programming in C using
Microsoft visual.net.  
jtradesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

makerpCommented:
it has nothing to do with tweking a compiler, you create threads in your code. if you do not create any extra threads then your program will have one thread, the primary thread.

to create extra threads look at _beginthread in VC++.

do a search on yahoo, there will be lots of threading examples
0
jtradesAuthor Commented:
I guess I need to rephrase my question.  I do know how threads are created and the functions
used for this process.  My question really has to do with what limits the number of threads
a program can create if that program were allowed to create an infinite supply.  Once this number
was known, could a person then tweak a compiler's settings (maybe shrinking/enlarging
a thread's stack size) to change this number.  If so, then can someone show me what I need to do
if I were using the Microsoft visual.net compiler.
0
SadrulCommented:
> My question really has to do with what limits the number of threads
> a program can create if that program were allowed to create an infinite supply.

the operating system. so you'll need to tweak your OS settings. (there should be a setting as to how many children a process can have.)

-- Adil
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.