Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

map读写冲突问题 #14

Open
ziyoumeng opened this issue Oct 18, 2016 · 0 comments
Open

map读写冲突问题 #14

ziyoumeng opened this issue Oct 18, 2016 · 0 comments

Comments

@ziyoumeng
Copy link

golangdoc -http=:6060 -lang=zh_CN
运行的时候报错:fatal error: concurrent map writes

经过go build -race调试,发现是local/local.go的
pkgDocTable = make(map[string]*doc.Package) // map[mapKey(...)]... pkgDocIndexTable = make(map[string]string) // map[mapKey(...)]...
读写冲突造成的,这两个map需要分别上读写锁

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant