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

Method WaitAndRecover

waitgroup.go:47–52  ·  view source on GitHub ↗

WaitAndRecover will block until all goroutines spawned with Go exit and will return a *panics.Recovered if one of the child goroutines panics.

()

Source from the content-addressed store, hash-verified

45// WaitAndRecover will block until all goroutines spawned with Go exit and
46// will return a *panics.Recovered if one of the child goroutines panics.
47func (h *WaitGroup) WaitAndRecover() *panics.Recovered {
48 h.wg.Wait()
49
50 // Return a recovered panic if we caught one from a child goroutine.
51 return h.pc.Recovered()
52}

Callers 2

TestWaitGroupFunction · 0.95

Calls 2

RecoveredMethod · 0.80
WaitMethod · 0.45

Tested by 2

TestWaitGroupFunction · 0.76