diff options
Diffstat (limited to 'worker_watcher.go')
-rwxr-xr-x | worker_watcher.go | 5 |
1 files changed, 2 insertions, 3 deletions
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()), } } |