Loading...
线程虚假唤醒问题方法定义wait 同步(对象){ while (<条件不成立>) obj.wait(超时); ... // 执行适合条件的操作 }notify notifyAll 原因分析1、创建资源类Share 属性:int count = 1 方法:incr 加1 | decr 减12、为incr方法上锁,判断count !...