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

map读写冲突问题 #14

@ziyoumeng

Description

@ziyoumeng

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需要分别上读写锁

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions