From 27392d90f3b208adc5215ce876698650a4188463 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Tue, 27 Oct 2020 16:06:39 +0300 Subject: Fix linter warnings --- worker_watcher.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'worker_watcher.go') diff --git a/worker_watcher.go b/worker_watcher.go index f49eeacf..d289750e 100755 --- a/worker_watcher.go +++ b/worker_watcher.go @@ -2,6 +2,7 @@ package roadrunner import ( "context" + "runtime" "sync" "time" @@ -9,8 +10,6 @@ import ( "github.com/spiral/roadrunner/v2/util" ) -//var = errors.New("watcher stopped") - type Stack struct { workers []WorkerBase mutex sync.RWMutex @@ -19,7 +18,7 @@ type Stack struct { func NewWorkersStack() *Stack { return &Stack{ - workers: make([]WorkerBase, 0), + workers: make([]WorkerBase, 0, runtime.NumCPU()), } } -- cgit v1.2.3