c# winform 关闭窗体时,同时结束线程(转)
摘要:
加一退出标志位,在关闭form的时候让线程安全退出volatile bool flag=true; TreadFunction() { while(flag) { //do Run Tread } } //在form的关闭事件中设置退出标志;Form_Closing(Object o,EverntA 阅读全文
posted @ 2020-10-25 22:21 xihong 阅读(1342) 评论(0) 推荐(0) 编辑