package
Version:
v0.0.0-...-66e828a
Opens a new window with list of versions in this module.
Published: Dec 3, 2019
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Example provided with help from Jason Waldrip.
Package work manages a pool of goroutines to perform work.
Pool provides a pool of goroutines that can execute any Worker
tasks that are submitted.
New creates a new work pool.
Run submits work to the pool.
func (p *Pool) Shutdown()
Shutdown waits for all the goroutines to shutdown.
type Worker interface {
Task()
}
Worker must be implemented by types that want to use
the work pool.
Source Files
¶
Directories
¶
This sample program demonstrates how to use the work package to use a pool of goroutines to get work done.
|
This sample program demonstrates how to use the work package to use a pool of goroutines to get work done. |
Click to show internal directories.
Click to hide internal directories.