You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2017/08/09 19:19:15 UTC

[5/5] activemq-artemis git commit: ARTEMIS-1334 Scheduled component shouldn't be synchronized

ARTEMIS-1334 Scheduled component shouldn't be synchronized


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/8bc15b11
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/8bc15b11
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/8bc15b11

Branch: refs/heads/master
Commit: 8bc15b1199e9aa82c1cb92586deaba46174473ad
Parents: 7b5d9f1
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Aug 8 16:00:01 2017 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Aug 9 15:18:54 2017 -0400

----------------------------------------------------------------------
 .../activemq/artemis/core/server/ActiveMQScheduledComponent.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8bc15b11/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQScheduledComponent.java
----------------------------------------------------------------------
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQScheduledComponent.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQScheduledComponent.java
index 87e8dc9..9524d89 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQScheduledComponent.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQScheduledComponent.java
@@ -41,7 +41,7 @@ public abstract class ActiveMQScheduledComponent implements ActiveMQComponent, R
    private long millisecondsPeriod;
    private TimeUnit timeUnit;
    private final Executor executor;
-   private ScheduledFuture future;
+   private volatile ScheduledFuture future;
    private final boolean onDemand;
 
    long lastTime = 0;
@@ -144,7 +144,7 @@ public abstract class ActiveMQScheduledComponent implements ActiveMQComponent, R
    }
 
    @Override
-   public synchronized void stop() {
+   public void stop() {
       if (future != null) {
          future.cancel(false);
          future = null;