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

Method WithMaxGoroutines

pool/error_pool.go:65–69  ·  view source on GitHub ↗

WithMaxGoroutines limits the number of goroutines in a pool. Defaults to unlimited. Panics if n < 1.

(n int)

Source from the content-addressed store, hash-verified

63// WithMaxGoroutines limits the number of goroutines in a pool.
64// Defaults to unlimited. Panics if n < 1.
65func (p *ErrorPool) WithMaxGoroutines(n int) *ErrorPool {
66 p.panicIfInitialized()
67 p.pool.WithMaxGoroutines(n)
68 return p
69}
70
71// deref is a helper that creates a shallow copy of the pool with the same
72// settings. We don't want to just dereference the pointer because that makes

Callers

nothing calls this directly

Calls 1

panicIfInitializedMethod · 0.95

Tested by

no test coverage detected