T
Tony Johansson
Hi!
I have check that the default available threads in the ThreadPool is 250 so
I made this small check just to see what happen what I run out of threads.
I noticed that I didn't get any kind of error such as execption or things
like that.
The only thing that happen is that no more threads is being used because
there is no one left.
This seems like a strange situation that I don't get an exeption ?
Give me a comment about this.
static void Main(string[] args)
{
for (int i = 0; i < 260; i++)
{
ThreadPool.QueueUserWorkItem(new WaitCallback(DoWork), i);
}
}
private static void DoWork(object o)
{
Console.WriteLine("Number = {0}",(int)o);
Thread.Sleep(9999999);
}
//Tony
I have check that the default available threads in the ThreadPool is 250 so
I made this small check just to see what happen what I run out of threads.
I noticed that I didn't get any kind of error such as execption or things
like that.
The only thing that happen is that no more threads is being used because
there is no one left.
This seems like a strange situation that I don't get an exeption ?
Give me a comment about this.
static void Main(string[] args)
{
for (int i = 0; i < 260; i++)
{
ThreadPool.QueueUserWorkItem(new WaitCallback(DoWork), i);
}
}
private static void DoWork(object o)
{
Console.WriteLine("Number = {0}",(int)o);
Thread.Sleep(9999999);
}
//Tony