/

时间:2024-10-21 21:03:39
面试必备之深入理解自旋锁

voo00oov: 大兄弟, TicketLock 这个案例有个逻辑错误 : public int lock() { int currentTicketNum = (); while (currentTicketNum != ()) { // Do nothing } return currentTicketNum; } int currentTicketNum = (); 这句应该是 int currentTicketNum = ();