提交 df48c995 编写于 作者: P Pickle 提交者: dailidong

fix singleton with volatile (#818)

上级 0392dad7
......@@ -39,7 +39,7 @@ public class AlertServer {
private AlertSender alertSender;
private static AlertServer instance;
private static volatile AlertServer instance;
private AlertServer() {
......
......@@ -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(){}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册