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

Method WithErrors

pool/pool.go:117–122  ·  view source on GitHub ↗

WithErrors converts the pool to an ErrorPool so the submitted tasks can return errors.

()

Source from the content-addressed store, hash-verified

115// WithErrors converts the pool to an ErrorPool so the submitted tasks can
116// return errors.
117func (p *Pool) WithErrors() *ErrorPool {
118 p.panicIfInitialized()
119 return &ErrorPool{
120 pool: p.deref(),
121 }
122}
123
124// deref is a helper that creates a shallow copy of the pool with the same
125// settings. We don't want to just dereference the pointer because that makes

Callers 6

WithContextMethod · 0.95
TestContextPoolFunction · 0.45
ExampleErrorPoolFunction · 0.45
TestErrorPoolFunction · 0.45
TestResultErrorGroupFunction · 0.45
TestResultContextPoolFunction · 0.45

Calls 2

panicIfInitializedMethod · 0.95
derefMethod · 0.95

Tested by 5

TestContextPoolFunction · 0.36
ExampleErrorPoolFunction · 0.36
TestErrorPoolFunction · 0.36
TestResultErrorGroupFunction · 0.36
TestResultContextPoolFunction · 0.36