Meituan-Dianping/Zebra

RemoteConfigService 中的getInstance虽然使用了双重锁定也不一定线程安全吧?

Fj-ivy opened this issue · 1 comments

RemoteConfigService 中的getInstance虽然使用了双重锁定也不一定线程安全吧?

No description provided.

public static RemoteConfigService getInstance() { return ConfigServiceHolder.configService; }

`private static class ConfigServiceHolder {
	private static RemoteConfigService configService = new RemoteConfigService();
	static {
		ConfigServiceHolder.configService.init();
	}
}`

大概这样会好一些吧?