These are chat archives for alibaba/dubbo

31st
Jan 2019
mingge007
@mingge007
Jan 31 08:17
Object instance = holder.get();
        if (instance == null) {
            synchronized (holder) {
                instance = holder.get();
                if (instance == null) {
                    instance = createExtension(name);
                    holder.set(instance);
                }
            }
        }
ExtensionLoader.getExtension() 方法中的双重检查意义在哪呢,不是并发情况下还是会出现编译重排序问题吗
huazhongming
@CrazyHZM
Jan 31 09:48
第一个判空是因为减轻性能的消耗