mirror of
https://github.com/werbenhu/eventbus.git
synced 2025-09-26 20:41:48 +08:00
Both sync.Map and cowmap use atomic.Value atomic operations to access 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.
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user