MCPcopy Create free account
hub / github.com/sourcegraph/conc / WithFirstError

Method WithFirstError

pool/result_error_pool.go:64–68  ·  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

62// WithFirstError configures the pool to only return the first error
63// returned by a task. By default, Wait() will return a combined error.
64func (p *ResultErrorPool[T]) WithFirstError() *ResultErrorPool[T] {
65 p.panicIfInitialized()
66 p.errorPool.WithFirstError()
67 return p
68}
69
70// WithMaxGoroutines limits the number of goroutines in a pool.
71// Defaults to unlimited. Panics if n < 1.

Callers

nothing calls this directly

Calls 1

panicIfInitializedMethod · 0.95

Tested by

no test coverage detected