mohuishou / go-design-pattern

golang design pattern go 设计模式实现,包含 23 种常见的设计模式实现,同时这也是极客时间-设计模式之美 的笔记
https://lailin.xyz/post/go-design-pattern.html
2.04k stars 339 forks source link

singleton: double-check inside the lock #7

Closed wandh closed 1 year ago

wandh commented 1 year ago

Double-check inside the lock, otherwise, there may be duplicate creations.