1
0
镜像自地址 https://github.com/astaxie/beego.git 已同步 2025-07-17 18:52:16 +00:00

fix orm datarace

这个提交包含在:
luxueyan
2019-06-14 14:43:02 +08:00
父节点 1b6edafc96
当前提交 394a73c75f

查看文件

@@ -335,11 +335,11 @@ func RegisterModelWithSuffix(suffix string, models ...interface{}) {
// BootStrap bootstrap models. // BootStrap bootstrap models.
// make all model parsed and can not add more models // make all model parsed and can not add more models
func BootStrap() { func BootStrap() {
modelCache.Lock()
defer modelCache.Unlock()
if modelCache.done { if modelCache.done {
return return
} }
modelCache.Lock()
defer modelCache.Unlock()
bootStrap() bootStrap()
modelCache.done = true modelCache.done = true
} }