artnaseef commented on code in PR #6207:
URL: https://github.com/apache/artemis/pull/6207#discussion_r2755981530


##########
artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java:
##########
@@ -81,12 +82,10 @@ public final class StompConnection extends 
AbstractRemotingConnection {
    //this means login is valid. (stomp connection ok)
    private boolean valid;
 
-   private boolean destroyed = false;
+   private AtomicBoolean destroyed = new AtomicBoolean(false);

Review Comment:
   I see.  It does concern me that this makes the code less readable, and 
therefore less maintainable.  Also, for this specific optimization, how 
valuable can it really be to save the GC of an AtomicBoolean when the lifecycle 
of that object is tied to the much larger StompConnection object?
   
   I'd love to see measurements that show how much of a gain it provides.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to