src/pkg/runtime/proc.c | 11 ++++++----- diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 0619a0330aa7a6dfa390471f436439c4c84c55e4..668a478a802185ee94eec4f4dfbd2c993132824e 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -20,11 +20,12 @@ // and no waiting ms, ready() will start a new m running in a new // OS thread, so that all ready gs can run simultaneously, up to a limit. // For now, ms never go away. // -// The default maximum number of ms is one: go runs single-threaded. -// This is because some locking details have to be worked ou -// (select in particular is not locked properly) and because the low-level -// code hasn't been written yet for OS X. Setting the environmen -// variable $gomaxprocs changes sched.mmax for now. +// By default, Go keeps only one kernel thread (m) running user code +// at a single time; other threads may be blocked in the operating system. +// Setting the environment variable $GOMAXPROCS or calling +// runtime.GOMAXPROCS() will change the number of user threads +// allowed to execute simultaneously. $GOMAXPROCS is thus an +// approximation of the maximum number of cores to use. // // Even a program that can run without deadlock in a single process // might use more ms if given the chance. For example, the prime