diff --git a/doc/effective_go.html b/doc/effective_go.html index 2c82ac91b7..cd6ac53602 100644 --- a/doc/effective_go.html +++ b/doc/effective_go.html @@ -2233,6 +2233,22 @@ func (v Vector) DoAll(u Vector) { +

+The current implementation of gc (6g, etc.) +will not parallelize this code by default. +It dedicates only a single core to user-level processing. An +arbitrary number of goroutines can be blocked in system calls, but +by default only one can be executing user-level code at any time. +It should be smarter and one day it will be smarter, but until it +is if you want CPU parallelism you must tell the run-time +how many goroutines you want executing code simultaneously. There +are two related ways to do this. Either run your job with environment +variable GOMAXPROCS set to the number of cores to use +(default 1); or import the runtime package and call +runtime.GOMAXPROCS(NCPU). +Again, this requirement is expected to be retired as the scheduling and run-time improve. +

+

A leaky buffer