func WorkerPoolSize(size int) WorkerDispatcherOption {
	if size <= 0 {
		panic(errors.New("the worker pool size must greater than 0"))
	}
	return func(d *WorkerDispatcher) {
		d.scaler.workerPoolSize = size
	}
}
WorkerPoolSize sets the worker pool size.
package jobq
import (
	"errors"
	"time"
)
type WorkerDispatcherOption func(*WorkerDispatcher)
func WorkerN(numWorkers int) WorkerDispatcherOption {
	if numWorkers <= 0 {
		panic(errors.New("the number of workers must greater than 0"))
	}
	return func(d *WorkerDispatcher) {
		d.scaler.workersNumLowerBound = numWorkers
	}
}