2018年7月2日

synchronized 与 volatile 原理 —— 内存屏障的重要实践

摘要: 单例模式的双重校验锁的实现: 第一种: private static Singleton _instance; public static synchronized Singleton getInstance() { if (_instance == null) { _instance = new 阅读全文

posted @ 2018-07-02 09:23 Lemo_wd 阅读(4185) 评论(1) 推荐(0)

导航