]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: document that NumCPU does not change
authorRuss Cox <rsc@golang.org>
Sat, 5 Dec 2015 04:16:50 +0000 (23:16 -0500)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sat, 5 Dec 2015 20:16:35 +0000 (20:16 +0000)
Fixes #11609.

Change-Id: I3cf64164fde28ebf739706728b84d8ef5b6dc90e
Reviewed-on: https://go-review.googlesource.com/17456
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/debug.go

index ac61173b7fe1195b1b712c9aa873685231c733ad..0f5936566e727cbdd349cf530d86a16b1776ea18 100644 (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)
 }