线程中断
线程类的interrupt()方法可对某一线程进行中断,例子如下:
Try to call fInterrupting com.test.thread.block.SynchronizedBlockedInterrupt set to com.test.thread.block.SynchronizedBlockedAborting with System.exit(0)
因为这里的f()方法一直不释放锁,interrupt()方法也无法使它停止
发布时间: 2012-12-18 12:43:41 作者: rapoo
线程中断
线程类的interrupt()方法可对某一线程进行中断,例子如下:
Try to call fInterrupting com.test.thread.block.SynchronizedBlockedInterrupt set to com.test.thread.block.SynchronizedBlockedAborting with System.exit(0)