摘要: 死锁产生的原因: 一个线程进入锁一需要锁二, 另一个线程进入锁二需要锁一, 由于锁一锁二都被占了,所以线程执行不下去。 所以只需写一个相互交叉的锁一锁二就可以产生死锁。 class sisuogoucheng implements Runnable{ private boolean panduan= 阅读全文
posted @ 2018-06-03 17:12 Saber本 阅读(605) 评论(0) 推荐(0) 编辑