From: Russ Cox Date: Sat, 5 Dec 2015 04:16:50 +0000 (-0500) Subject: runtime: document that NumCPU does not change X-Git-Tag: go1.6beta1~173 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c5a94ba24fd0392bab2c5b2404a820dbf6bc7346;p=gostls13.git runtime: document that NumCPU does not change Fixes #11609. Change-Id: I3cf64164fde28ebf739706728b84d8ef5b6dc90e Reviewed-on: https://go-review.googlesource.com/17456 Reviewed-by: Ian Lance Taylor --- diff --git a/src/runtime/debug.go b/src/runtime/debug.go index ac61173b7f..0f5936566e 100644 --- a/src/runtime/debug.go +++ b/src/runtime/debug.go @@ -35,6 +35,10 @@ func GOMAXPROCS(n int) int { } // NumCPU returns the number of logical CPUs usable by the current process. +// +// The set of available CPUs is checked by querying the operating system +// at process startup. Changes to operating system CPU allocation after +// process startup are not reflected. func NumCPU() int { return int(ncpu) }