summaryrefslogtreecommitdiff
path: root/worker_watcher.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-10-27 16:06:39 +0300
committerValery Piashchynski <[email protected]>2020-10-27 16:06:39 +0300
commit27392d90f3b208adc5215ce876698650a4188463 (patch)
treedb4c7e348c6b03c478a907cf89c8baaf68195d73 /worker_watcher.go
parentac5a89d63dbed7e0318c7e70ec1b0fa9c98c198a (diff)
Fix linter warnings
Diffstat (limited to 'worker_watcher.go')
-rwxr-xr-xworker_watcher.go5
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()),
}
}