ARTEMIS-1334 Scheduled component shouldn't be synchronized

This commit is contained in:
Clebert Suconic 2017-08-08 16:00:01 -04:00
parent 7b5d9f120c
commit 8bc15b1199
1 changed files with 2 additions and 2 deletions

View File

@ -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;