“The choice is arbitrary and occurs at the discretion of the implementation.”“The choice is arbitrary and occurs at the discretion of the implementation.”
首先:使用wait方法和使用synchornized来分配cpu时间是有本质区别的。wait会释放锁,synchornized不释放锁。
“The choice is arbitrary and occurs at the discretion of the implementation.”“The choice is arbitrary and occurs at the discretion of the implementation.”
首先:使用wait方法和使用synchornized来分配cpu时间是有本质区别的。wait会释放锁,synchornized不释放锁。