From 3ffcbb633e95b17389ce5ce2f6b5dbcbbdf88828 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 28 May 2015 12:35:35 -0400 Subject: [PATCH] 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 --- src/runtime/proc1.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.50.0