MCPcopy Index your code
hub / github.com/sourcegraph/conc / Go

Method Go

waitgroup.go:28–34  ·  view source on GitHub ↗

Go spawns a new goroutine in the WaitGroup.

(f func())

Source from the content-addressed store, hash-verified

26
27// Go spawns a new goroutine in the WaitGroup.
28func (h *WaitGroup) Go(f func()) {
29 h.wg.Add(1)
30 go func() {
31 defer h.wg.Done()
32 h.pc.Try(f)
33 }()
34}
35
36// Wait will block until all goroutines spawned with Go exit and will
37// propagate any panics spawned in a child goroutine.

Callers 4

ExampleWaitGroupFunction · 0.95
TestWaitGroupFunction · 0.95
ForEachIdxMethod · 0.95

Calls 1

TryMethod · 0.80

Tested by 3

ExampleWaitGroupFunction · 0.76
TestWaitGroupFunction · 0.76