2022年11月7日
摘要: 线程状态 线程停止 推荐线程自己停下来 建议使用一个标志位进行终止变量当flag=false,则线程终止 public class TestStop implements Runnable{ //1.设置一个标识位(线程中定义线程使用的标识) private boolean flag = true; 阅读全文
posted @ 2022-11-07 14:53 松下的蘑菇 阅读(21) 评论(0) 推荐(0)