kevinrr888 commented on code in PR #5873:
URL: https://github.com/apache/accumulo/pull/5873#discussion_r2334309026
##########
core/src/main/java/org/apache/accumulo/core/lock/ServiceLock.java:
##########
@@ -547,7 +547,7 @@ public synchronized void unlock() throws
InterruptedException, KeeperException {
// Wait for the delete to happen on the server before exiting method
Timer start = Timer.startNew();
while (zooKeeper.exists(pathToDelete, null) != null) {
- Thread.onSpinWait();
Review Comment:
`while (!condition) {Thread.onSpinWait();}`
seems to be a enhancement over
`while (!condition) {}`
but it's still going to constantly be looping like the latter. onSpinWait
seems to be useful for very short lived waits (on order of nanoseconds).
--
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]