News for hackers. Stuff that matters.
Re:A whirlwind tour of Go’s runtime environment variables by thrownaway2424 on Sunday November 29, 2015 @11:46AM (#10645090)
They should let this author commit changes to the runtime package docs, because this explanation of GOMAXPROCS is much more clear than the official docs.

This article: "the number of CPUs (whatever your operating system considers to be a CPU) visible to the program at startup."

Official docs: "The number of logical CPUs on the local machine can be queried with NumCPU." and "NumCPU returns the number of logical CPUs usable by the current process."

The problem with the official docs is they don't mention that the value of NumCPU is locked in at startup and never changes.

Re:A whirlwind tour of Go’s runtime environment variables by kibwen on Sunday November 29, 2015 @12:19PM (#10645246)
The fact that it's locked in at startup might be an implementation detail that they don't want people generally relying on, but I personally don't know if that's the case.
Re:A whirlwind tour of Go’s runtime environment variables by thrownaway2424 on Sunday November 29, 2015 @05:28PM (#10646367)
That may be, but the docs for NumCPU are still just wrong. NumCPU does not return the number of logical processors in the machine. It returns the population count of the cpu mask, at the moment the runtime was initialized.
Re:A whirlwind tour of Go’s runtime environment variables by dlisboa on Sunday November 29, 2015 @12:22PM (#10645262)
He is part of the Go team.
Re:A whirlwind tour of Go’s runtime environment variables by 4ad on Sunday November 29, 2015 @01:06PM (#10645429)
Dave is a very prolific and important contributor, but he is not on the Go team.
Re:A whirlwind tour of Go’s runtime environment variables by lloydde on Sunday November 29, 2015 @04:01PM (#10646049)
Splitting hairs; as you say he is a prolific contributor.