DesignPattern icon indicating copy to clipboard operation
DesignPattern copied to clipboard

单例模式-go语言实现不是线程安全的

Open wangfeiing opened this issue 5 years ago • 0 comments

在代码文件中 Singleton/GO/singleton/singleton.go 多协程的场景下不是线程安全的,推荐使用 sync.Once 来实现。

wangfeiing avatar Jul 12 '19 02:07 wangfeiing