Skip to content

Commit

Permalink
Both sync.Map and cowmap use atomic.Value atomic operations to access…
Browse files Browse the repository at this point in the history
… the map during data reading, resulting in similar read performance. However, sync.Map has better write performance. Therefore, cowmap directly utilizes sync.Map as its internal structure.
  • Loading branch information
werbenhu committed Aug 10, 2023
1 parent b8351ed commit 8314022
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions cowmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import (
func Test_NewCowMap(t *testing.T) {
m := NewCowMap()
assert.NotNil(t, m)
assert.NotNil(t, m.readable)
}
}

func Test_CowMapLoad(t *testing.T) {
Expand Down

0 comments on commit 8314022

Please sign in to comment.