5 ms·
A whirlwind tour of Go’s runtime environment variables
- ZoF 11y agoSite's down for me. http://webcache.googleusercontent.com/search?q=cache:OXupz2ZeSOAJ:dave.cheney.net/2015/11/29/a-whirlwind-tour-of-gos-runtime-environment-variables&hl=en&gl=us&strip=1&vwsrc=0 http://webcache.googleusercontent.com/search?q=cache:OXupz2Z...
- Artemis2 11y agoThere's also GO15VENDOREXPERIMENT in Go 1.5. It enables dependency vendoring with a vendor/ directory for each package. More details here: https://golang.org/s/go15vendor https://golang.org/s/go15vendor.
- thrownaway2424 11y agoThey 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.
- kibwen 11y agoThe 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.
- thrownaway2424 11y agoThat 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.
- dlisboa 11y agoHe is part of the Go team.