ARTEMIS-1334 Scheduled component shouldn't be synchronized
(cherry picked from commit 8bc15b1199
)
This commit is contained in:
parent
0c5962f1b8
commit
393cf9bfef
|
@ -41,7 +41,7 @@ public abstract class ActiveMQScheduledComponent implements ActiveMQComponent, R
|
||||||
private long millisecondsPeriod;
|
private long millisecondsPeriod;
|
||||||
private TimeUnit timeUnit;
|
private TimeUnit timeUnit;
|
||||||
private final Executor executor;
|
private final Executor executor;
|
||||||
private ScheduledFuture future;
|
private volatile ScheduledFuture future;
|
||||||
private final boolean onDemand;
|
private final boolean onDemand;
|
||||||
|
|
||||||
long lastTime = 0;
|
long lastTime = 0;
|
||||||
|
@ -144,7 +144,7 @@ public abstract class ActiveMQScheduledComponent implements ActiveMQComponent, R
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void stop() {
|
public void stop() {
|
||||||
if (future != null) {
|
if (future != null) {
|
||||||
future.cancel(false);
|
future.cancel(false);
|
||||||
future = null;
|
future = null;
|
||||||
|
|
Loading…
Reference in New Issue