Skip to content

Commit

Permalink
agent: Adding a check for GOMAXPROCS. Fixes #10.
Browse files Browse the repository at this point in the history
  • Loading branch information
armon committed Feb 23, 2014
1 parent 13af774 commit 3a5b8fe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions command/agent/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"net"
"os"
"os/signal"
"runtime"
"strings"
"syscall"
"time"
Expand Down Expand Up @@ -189,6 +190,11 @@ func (c *Command) Run(args []string) int {
}
c.args = args

// Check GOMAXPROCS
if runtime.GOMAXPROCS(0) == 1 {
c.Ui.Error("WARNING: It is highly recommended to set GOMAXPROCS higher than 1")
}

// Setup the log outputs
logGate, logWriter, logOutput := c.setupLoggers(config)
if logWriter == nil {
Expand Down

0 comments on commit 3a5b8fe

Please sign in to comment.