T
Tom
Hello friends,
for some reason when I execute this piece of code in a winform it
immediately crashes the app.
baseically I'm trying to manage a thread pool for a client/server based app.
while(true)
{
while (!client.Pending())
{
Thread.Sleep(1000);
}
ConnectionThread newconnection = new
ConnectionThread();
newconnection.threadListener = this.client;
ThreadPool.QueueUserWorkItem(new
WaitCallback(newconnection.HandleConnection));
}
after debugging it seems to crash as soon as it enters the while loop.
any crumbs of wisdom is appreciated
thankyou
Tom
for some reason when I execute this piece of code in a winform it
immediately crashes the app.
baseically I'm trying to manage a thread pool for a client/server based app.
while(true)
{
while (!client.Pending())
{
Thread.Sleep(1000);
}
ConnectionThread newconnection = new
ConnectionThread();
newconnection.threadListener = this.client;
ThreadPool.QueueUserWorkItem(new
WaitCallback(newconnection.HandleConnection));
}
after debugging it seems to crash as soon as it enters the while loop.
any crumbs of wisdom is appreciated
thankyou
Tom