go get github.com/Zytekaron/go-workers
Support: Contact Me
NewPool(size int, run RunFunc)
Create a new WorkerPool with an initial worker count
NewBufferedPool(size int, bufSize int, run RunFunc)
Create a new WorkerPool with an initial worker count and job buffer size
RunFunc
= func(interface{})
Pool#Size()
Get the total number of workers in this WorkerPool
Pool#Busy()
Get the number of busy workers in this WorkerPool
Pool#Run(data interface{})
Add a job to this WorkerPool
Pool#ScaleUp(newSize int)
Scale the WorkerPool up to a new specified size
Pool#ScaleUp(newSize int)
Scale the WorkerPool down to a new specified size
Example usage can be found here
go-workers is licensed under the MIT License