MCPcopy
hub / github.com/uber-go/zap / runConcurrently

Function runConcurrently

common_test.go:47–57  ·  common_test.go::runConcurrently
(goroutines, iterations int, wg *sync.WaitGroup, f func())

Source from the content-addressed store, hash-verified

45}
46
47func runConcurrently(goroutines, iterations int, wg *sync.WaitGroup, f func()) {
48 wg.Add(goroutines)
49 for g := 0; g < goroutines; g++ {
50 go func() {
51 defer wg.Done()
52 for i := 0; i < iterations; i++ {
53 f()
54 }
55 }()
56 }
57}

Callers 2

TestLoggerConcurrentFunction · 0.85
TestAtomicLevelMutationFunction · 0.85

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected