This Go Module contains an implementation of a workerpool which can get expanded & shrink dynamically. Workers can get added when needed and get dismissed when no longer are needed. Of-course this workerpool can be used just as a simple one with a fixed size.
Examples can be seen inside documents.
In the go.mod file of your code:
module github.com/user/project
go 1.15
require (
github.com/dc0d/workerpool/v5 v5.0.1
...
)
And in the code, import it as:
import "github.com/dc0d/workerpool/v5"