ThreadStart ts = new ThreadStart(UpdateFile );
Thread th = new Thread(ts);
Thread th = new Thread(ts);
th.Start();//开启线程
th.Join();//阻塞调用线程,直到th线程终止
if (!th.IsAlive)//如果线程关闭
{
this.Close();
}
if (!th.IsAlive)//如果线程关闭
{
this.Close();
}