You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by franz1981 <gi...@git.apache.org> on 2017/08/22 12:52:45 UTC

[GitHub] activemq-artemis issue #1477: ARTEMIS-1356 Avoid allocations and atomic oper...

Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1477
  
    @clebertsuconic 
    Here:
    https://github.com/apache/activemq-artemis/blob/e81c8c26d02f156e75fe03cb8cc8ad92e4bca30e/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java#L231
    
    On each first ThreadLocal::get call from a different thread, the ThreadLocal allocates and cache (locally to the thread) a new AtomicBoolean.
    In addition, the AtomicBoolean::get and AtomicBoolean::set operations can be avoided to "mark" the handler thread...



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---