摘要: package com.deadlock; /* * 演示死锁:(由毕向东视频所得) * 一种解释:Thread—0拿到lock1锁,Thread—1拿到lock2锁,Thread—0想要lock2锁而Thread-1想要lock1锁, * 两个线程都无法继续执行下去,产生死锁。 * 执行结果:Thread-0 if.....lock1 * Thread-1 else...... 阅读全文
posted @ 2014-09-14 23:11 加肥猫咪 阅读(236) 评论(0) 推荐(0) 编辑