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

Method WithFirstError

pool/error_pool.go:57–61  ·  view source on GitHub ↗

WithFirstError configures the pool to only return the first error returned by a task. By default, Wait() will return a combined error.

()

Source from the content-addressed store, hash-verified

55// WithFirstError configures the pool to only return the first error
56// returned by a task. By default, Wait() will return a combined error.
57func (p *ErrorPool) WithFirstError() *ErrorPool {
58 p.panicIfInitialized()
59 p.onlyFirstError = true
60 return p
61}
62
63// WithMaxGoroutines limits the number of goroutines in a pool.
64// Defaults to unlimited. Panics if n < 1.

Callers 3

TestContextPoolFunction · 0.45
TestResultErrorGroupFunction · 0.45
TestResultContextPoolFunction · 0.45

Calls 1

panicIfInitializedMethod · 0.95

Tested by 3

TestContextPoolFunction · 0.36
TestResultErrorGroupFunction · 0.36
TestResultContextPoolFunction · 0.36