1
0
mirror of https://github.com/golang/go synced 2024-11-23 16:40:03 -07:00

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 <iant@golang.org>
This commit is contained in:
Russ Cox 2015-12-04 23:16:50 -05:00 committed by Brad Fitzpatrick
parent 025e9b0ca3
commit c5a94ba24f

View File

@ -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)
}