Apache9 commented on PR #7600:
URL: https://github.com/apache/hbase/pull/7600#issuecomment-3721559867

   > Lgtm. Getting rid of Thread.sleep()s is good, but why do you say that 
wait()/notify() is unstable?
   
   I mean 'one time' wait/notifyAll. Usually you need to use a while loop and a 
condition to do waiting, this is the javadoc for wait method in Java
   
   ```
        * A thread can wake up without being notified, interrupted, or timing 
out, a
        * so-called <em>spurious wakeup</em>.  While this will rarely occur in 
practice,
        * applications must guard against it by testing for the condition that 
should
        * have caused the thread to be awakened, and continuing to wait if the 
condition
        * is not satisfied. See the example below.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to