Map with concurrent access

前端 未结 6 1355

When you use a map in a program with concurrent access, is there any need to use a mutex in functions to read values?

6条回答
  •  悲哀的现实
    2020-11-29 01:52

    sync.Map has merged to Go master as of April 27, 2017.

    This is the concurrent Map we have all been waiting for.

    https://github.com/golang/go/blob/master/src/sync/map.go

    https://godoc.org/sync#Map

提交回复
热议问题