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"