MCPcopy Create free account
hub / github.com/goinaction/code / Pool

Struct Pool

chapter7/patterns/work/work.go:15–18  ·  view source on GitHub ↗

Pool provides a pool of goroutines that can execute any Worker tasks that are submitted.

Source from the content-addressed store, hash-verified

13// Pool provides a pool of goroutines that can execute any Worker
14// tasks that are submitted.
15type Pool struct {
16 work chan Worker
17 wg sync.WaitGroup
18}
19
20// New creates a new work pool.
21func New(maxGoroutines int) *Pool {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected