限制子线程运行一次

2025-05-05 05:12:06
推荐回答(1个)
回答1:

使用stop方法强行终止线程(这个方法不推荐使用,因为stop和suspend、resume一样,也可能发生不可预料的结果)。
使用interrupt方法中断线程。