4 ms·
Did you set the GOMAXPROCS environment variable? // By default, Go keeps only one kernel thread (m) running user code // at a single time; other threads ma
by davvid 14y ago
Did you set the GOMAXPROCS environment variable?
// 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.
From http://golang.org/src/pkg/runtime/proc.c http://golang.org/src/pkg/runtime/proc.c