Commit 5e17fbda authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer: Set GOMAXPROCS for number of CPU if n ot set

parent 085533c1
......@@ -8,6 +8,7 @@ import (
"io/ioutil"
"log"
"os"
"runtime"
)
func main() {
......@@ -19,6 +20,11 @@ func main() {
log.SetOutput(os.Stderr)
}
// If there is no explicit number of Go threads to use, then set it
if os.Getenv("GOMAXPROCS") == "" {
runtime.GOMAXPROCS(runtime.NumCPU())
}
defer plugin.CleanupClients()
config, err := parseConfig(defaultConfig)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment