[ https://issues.apache.org/jira/browse/ARTEMIS-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115530#comment-16115530 ]
ASF GitHub Bot commented on ARTEMIS-1324: ----------------------------------------- Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1443#discussion_r131530746 --- Diff: artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalAnalyzerImpl.java --- @@ -0,0 +1,182 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.activemq.artemis.utils.critical; + +import java.util.ConcurrentModificationException; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.Semaphore; +import java.util.concurrent.TimeUnit; + +import org.apache.activemq.artemis.utils.collections.ConcurrentHashSet; +import org.jboss.logging.Logger; + +public class CriticalAnalyzerImpl implements CriticalAnalyzer { + + private final Logger logger = Logger.getLogger(CriticalAnalyzer.class); + + private volatile long timeout; --- End diff -- if this is on hot path, why not use an atomic or have use atomicfieldupdater (same with check time) http://normanmaurer.me/blog/2013/10/28/Lesser-known-concurrent-classes-Part-1/ > Critical Analysis and deadlock detection on broker > -------------------------------------------------- > > Key: ARTEMIS-1324 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1324 > Project: ActiveMQ Artemis > Issue Type: New Feature > Components: Broker > Reporter: clebert suconic > Assignee: clebert suconic > Priority: Critical > Fix For: 2.3.0 > > -- This message was sent by Atlassian JIRA (v6.4.14#64029)