MCPcopy Create free account
hub / github.com/dc0d/workerpool / Stop

Method Stop

workerpool.go:79–82  ·  view source on GitHub ↗

Stop stops the pool and waits for all workers to return.

()

Source from the content-addressed store, hash-verified

77
78// Stop stops the pool and waits for all workers to return.
79func (pool *WorkerPool) Stop() {
80 pool.quitOnce.Do(func() { close(pool.quit) })
81 pool.wg.Wait()
82}
83
84// Expand is for putting more 'Worker's into work. If there is'nt any job to do,
85// and a timeout is set, they will simply get timed-out.

Callers 2

ExampleWorkerPoolFunction · 0.80
ExampleWorkerPool_ExpandFunction · 0.80

Calls

no outgoing calls

Tested by 2

ExampleWorkerPoolFunction · 0.64
ExampleWorkerPool_ExpandFunction · 0.64