aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-10 19:59:22 -0800
committerRuss Cox <rsc@golang.org>2009-11-10 19:59:22 -0800
commitfe1e49241c04c748d0e3f4762925241adcb8d7da (patch)
treed96715e1304fddb3a68cd105d1ec94dcfd69bacf
parent9604f7b00974ca31cacf5b69e2cbf4cc23531a50 (diff)
downloadgo-fe1e49241c04c748d0e3f4762925241adcb8d7da.tar.gz
go-fe1e49241c04c748d0e3f4762925241adcb8d7da.zip
update old comment: things are much better now
R=r https://golang.org/cl/152057
-rw-r--r--src/pkg/runtime/proc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c
index 0619a0330a..668a478a80 100644
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -20,11 +20,12 @@ static int32 debug = 0;
// 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