//
pkg.gl
Category
github.com/blackhorseya/golang-101
simple-workerpool
package
0.0.0-20241212013832-3e83a38c33ff
Repository:
https://github.com/blackhorseya/golang-101.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
3
Dependents
0
Files
63 SLOC
#
Functions
NewJob
NewJob creates a new job with the given id.
NewPool
NewPool creates a new pool of workers.
NewWorker
NewWorker creates a new worker with the given id.
#
Structs
Job
Job represents the job to be run.
Pool
Pool represents a pool of workers that can execute jobs.
Worker
Worker represents the worker that executes the job.