Threading problem in c#.net

Sep 21 2009 8:03 AM


t =
new Thread(new ThreadStart(picsend));
t.IsBackground.CompareTo(
true);
t.Start();
 

Hi, I am running Thread like this using this server prog receives video stream from the client program
if first client prog is started and then server prog is started the no  problem occuring
if i start the server first and closed the server and then again if i start the server then it is giving
A PROBLEM IS ENCOUNTERED AND NEEDS TO CLOSE
THEN i am going to ctrl+alt+del(windows task manager ) and killing the server process every time
how to avoid this problem

iam aborting the thread in form close event llike bellow
private
void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
t.Abort();

}

Answers (3)