111,126
社区成员
发帖
与我相关
我的任务
分享
//开始
Thread th1 = new Thread(test);
th1.Start();
//判断如果存在,结束线程
if(th1.IsAlive)
{
th1.Abort();
th1.Join();
}
Thread.ThreadState = Threading.ThreadState.Stopped
Thread t1 = new Thread(test);
t1.Start();
//等待t1结束
while(t1.IsAlive)
{
Thread.Sleep(0);
}
//do otherthing..
If t1.ThreadState = Threading.ThreadState.Stopped Then
'执行完成
End If