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

Struct ErrorPool

pool/error_pool.go:17–24  ·  view source on GitHub ↗

ErrorPool is a pool that runs tasks that may return an error. Errors are collected and returned by Wait(). The configuration methods (With*) will panic if they are used after calling Go() for the first time. A new ErrorPool should be created using `New().WithErrors()`.

Source from the content-addressed store, hash-verified

15//
16// A new ErrorPool should be created using `New().WithErrors()`.
17type ErrorPool struct {
18 pool Pool
19
20 onlyFirstError bool
21
22 mu sync.Mutex
23 errs error
24}
25
26// Go submits a task to the pool. If all goroutines in the pool
27// are busy, a call to Go() will block until the task can be started.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected