摘要:
字面翻译是“两阶段终止”,这个模式用来进行结束操作后,再终止线程。比如我们想停止一个线程,但是让他停止之前必须要做一些清理工作,这时候就需要用到two-phase termination模式。public class TwoPhaseTerminationTest { /** * @param args */ public static void main(String[] args) { System.out.println("main begin"); try { CountupThread t = new Co... 阅读全文
posted @ 2013-09-08 14:47
高天乐
阅读(389)
评论(0)
推荐(0)

浙公网安备 33010602011771号