Link to home
Start Free TrialLog in
Avatar of jtrades
jtrades

asked on

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.  
Avatar of Paul Maker
Paul Maker
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of jtrades
jtrades

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Sadrul
Sadrul

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial