gharris1727 commented on code in PR #16179:
URL: https://github.com/apache/kafka/pull/16179#discussion_r1625208358


##########
clients/src/main/java/org/apache/kafka/common/utils/SystemTime.java:
##########
@@ -26,6 +26,18 @@
  */
 public class SystemTime implements Time {
 
+    /**
+     * use the static inner class to implement the singleton pattern
+     * to avoid the overhead of synchronization

Review Comment:
   Can you explain this comment? I don't know what it's referring to, as none 
of this code is synchronized.
   
   The static inner class seems to be a lazy initialization trick, which is 
ineffective here (due to Time.SYSTEM) and unneeded (since the SystemTime 
constructor is very cheap).



-- 
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