11 ms·
http://golang.org/doc/faq http://golang.org/doc/faq Why doesn't my multi-goroutine program use multiple CPUs? You must set the GOMAXPROCS shell environment va
by MetaCosm 13y ago
http://golang.org/doc/faq http://golang.org/doc/faq
Why doesn't my multi-goroutine program use multiple CPUs?
You must set the GOMAXPROCS shell environment variable or use the similarly-named function of the runtime package to allow the run-time support to utilize more than one OS thread.
Programs that perform parallel computation should benefit from an increase in GOMAXPROCS. However, be aware that concurrency is not parallelism.