From: Russ Cox Date: Thu, 28 May 2015 16:35:35 +0000 (-0400) Subject: runtime: default GOMAXPROCS to NumCPU(), not 1 X-Git-Tag: go1.5beta1~348 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3ffcbb633e95b17389ce5ce2f6b5dbcbbdf88828;p=gostls13.git runtime: default GOMAXPROCS to NumCPU(), not 1 See golang.org/s/go15gomaxprocs for details. Change-Id: I8de5df34fa01d31d78f0194ec78a2474c281243c Reviewed-on: https://go-review.googlesource.com/10668 Reviewed-by: Rob Pike --- diff --git a/src/runtime/proc1.go b/src/runtime/proc1.go index ba092c7f88..0f93ff7620 100644 --- a/src/runtime/proc1.go +++ b/src/runtime/proc1.go @@ -62,7 +62,7 @@ func schedinit() { gcinit() sched.lastpoll = uint64(nanotime()) - procs := 1 + procs := int(ncpu) if n := atoi(gogetenv("GOMAXPROCS")); n > 0 { if n > _MaxGomaxprocs { n = _MaxGomaxprocs