- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestMapClearNoAllocations (0.5 sec)
-
src/sync/map_test.go
} wg.Wait() m.Clear() m.Range(func(k, v any) bool { t.Errorf("after Clear, Map contains (%v, %v); expected to be empty", k, v) return true }) } func TestMapClearNoAllocations(t *testing.T) { testenv.SkipIfOptimizationOff(t) var m sync.Map allocs := testing.AllocsPerRun(10, func() { m.Clear() }) if allocs > 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 01 15:34:22 UTC 2024 - 8.1K bytes - Viewed (0)