do not overwrite GOMAXPROCS env

master
Oliver Tonnhofer 2013-06-20 17:08:48 +02:00
parent c11dc8a55e
commit bb083e9442
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ func dief(msg string, args ...interface{}) {
func main() {
golog.SetFlags(golog.LstdFlags | golog.Lshortfile)
runtime.GOMAXPROCS(runtime.NumCPU())
if os.Getenv("GOMAXPROCS") == "" {
runtime.GOMAXPROCS(runtime.NumCPU())
}
flag.Parse()
if *cpuprofile != "" {