Closed
Description
What version of Go are you using (go version
)?
go 1.9 beta2
What did you expect to see?
If use map, I can get the size of it by len(map). Whatever, how can I get the size of sync.Map?
What did you see instead?
Add function: func (m *Map) Len() int
Maybe Map should have a member "size int64". Map can change its value in Store & LoadOrStore & Delete by using atomic.AddInt64. And then (m Map) Len() can return m.size to get Map's size.