mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-04 12:52:28 +08:00
doc: add doc for CurrentMap
This commit is contained in:
@@ -24,17 +24,13 @@ func TestConcurrentMap_Set_Get(t *testing.T) {
|
||||
}
|
||||
wg1.Wait()
|
||||
|
||||
var wg2 sync.WaitGroup
|
||||
wg2.Add(10)
|
||||
for j := 0; j < 10; j++ {
|
||||
go func(n int) {
|
||||
val, ok := cm.Get(fmt.Sprintf("%d", n))
|
||||
assert.Equal(n, val)
|
||||
assert.Equal(true, ok)
|
||||
wg2.Done()
|
||||
}(j)
|
||||
}
|
||||
wg2.Wait()
|
||||
}
|
||||
|
||||
func TestConcurrentMap_GetOrSet(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user