Browse Source

fix singleton with volatile (#818)

pull/2/head
Pickle 5 years ago committed by dailidong
parent
commit
df48c99577
  1. 2
      escheduler-alert/src/main/java/cn/escheduler/alert/AlertServer.java
  2. 2
      escheduler-common/src/main/java/cn/escheduler/common/thread/ThreadPoolExecutors.java

2
escheduler-alert/src/main/java/cn/escheduler/alert/AlertServer.java

@ -39,7 +39,7 @@ public class AlertServer {
private AlertSender alertSender;
private static AlertServer instance;
private static volatile AlertServer instance;
private AlertServer() {

2
escheduler-common/src/main/java/cn/escheduler/common/thread/ThreadPoolExecutors.java

@ -40,7 +40,7 @@ public class ThreadPoolExecutors {
private static final Logger logger = LoggerFactory.getLogger(ThreadPoolExecutors.class);
private static Executor executor;
private static ThreadPoolExecutors threadPoolExecutors;
private static volatile ThreadPoolExecutors threadPoolExecutors;
private ThreadPoolExecutors(){}

Loading…
Cancel
Save