activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michaelandrepearce <>
Subject [GitHub] activemq-artemis pull request #1477: ARTEMIS-1356 Avoid allocations and atom...
Date Tue, 22 Aug 2017 12:51:11 GMT
Github user michaelandrepearce commented on a diff in the pull request:
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/
    @@ -159,7 +158,11 @@
        private final boolean direct;
    -   private static final ThreadLocal<AtomicBoolean> inHandler = ThreadLocal.withInitial(AtomicBoolean::new);
    +   //marker instance used to recognize if a thread is performing a packet handling
    +   private static final Object DUMMY = Boolean.TRUE;
    +   //a thread that has its thread-local map populated with DUMMY is performing a packet
    +   private static final ThreadLocal<Object> inHandler = new ThreadLocal<>();
    --- End diff --
    Fair doosies. Maybe a nit if that's the case why not make it Object() this way stops any
inference the boolean is being used as a true false flag. Which I'll be honest is what I was
thinking this was.

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 or file a JIRA ticket
with INFRA.

View raw message