Commit c5a94ba2 authored by Russ Cox's avatar Russ Cox Committed by Brad Fitzpatrick

runtime: document that NumCPU does not change

Fixes #11609.

Change-Id: I3cf64164fde28ebf739706728b84d8ef5b6dc90e
Reviewed-on: https://go-review.googlesource.com/17456Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 025e9b0c
......@@ -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)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment