increase default worker count to 4 per cpu

This commit is contained in:
tsmethurst 2022-06-02 15:52:12 +02:00
parent c1f225f373
commit d2c512575c

View file

@ -45,7 +45,7 @@ func NewWorkerPool[MsgType any](workers int, queueRatio int) *WorkerPool[MsgType
if workers < 1 {
// ensure sensible workers
workers = runtime.GOMAXPROCS(0) * 2
workers = runtime.GOMAXPROCS(0) * 4
}
if queueRatio < 1 {
// ensure sensible ratio