Skip to content

Commit fe1e492

Browse files
committed
update old comment: things are much better now
R=r https://golang.org/cl/152057
1 parent 9604f7b commit fe1e492

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/pkg/runtime/proc.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ static int32 debug = 0;
2020
// OS thread, so that all ready gs can run simultaneously, up to a limit.
2121
// For now, ms never go away.
2222
//
23-
// The default maximum number of ms is one: go runs single-threaded.
24-
// This is because some locking details have to be worked ou
25-
// (select in particular is not locked properly) and because the low-level
26-
// code hasn't been written yet for OS X. Setting the environmen
27-
// variable $gomaxprocs changes sched.mmax for now.
23+
// By default, Go keeps only one kernel thread (m) running user code
24+
// at a single time; other threads may be blocked in the operating system.
25+
// Setting the environment variable $GOMAXPROCS or calling
26+
// runtime.GOMAXPROCS() will change the number of user threads
27+
// allowed to execute simultaneously. $GOMAXPROCS is thus an
28+
// approximation of the maximum number of cores to use.
2829
//
2930
// Even a program that can run without deadlock in a single process
3031
// might use more ms if given the chance. For example, the prime

0 commit comments

Comments
 (0)