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

Struct ResultErrorPool

pool/result_error_pool.go:17–21  ·  view source on GitHub ↗

ResultErrorPool is a pool that executes tasks that return a generic result type and an error. Tasks are executed in the pool with Go(), then the results of the tasks are returned by Wait(). The order of the results is not guaranteed to be the same as the order the tasks were submitted. If your use

Source from the content-addressed store, hash-verified

15// The configuration methods (With*) will panic if they are used after calling
16// Go() for the first time.
17type ResultErrorPool[T any] struct {
18 errorPool ErrorPool
19 agg resultAggregator[T]
20 collectErrored bool
21}
22
23// Go submits a task to the pool. If all goroutines in the pool
24// 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