Update en 01.1.md and 02.7.md
This commit is contained in:
@@ -47,7 +47,9 @@ We see that it's very easy to use concurrency in Go by using the keyword `go`. I
|
||||
|
||||
runtime.Gosched() means let the CPU execute other goroutines, and come back at some point.
|
||||
|
||||
The scheduler only uses one thread to run all goroutines, which means it only implements concurrency. If you want to use more CPU cores in order to take advantage of parallel processing, you have to call runtime.GOMAXPROCS(n) to set the number of cores you want to use. If `n<1`, it changes nothing. This function may be removed in the future, see more details about parallel processing and concurrency in this [article](http://concur.rspace.googlecode.com/hg/talk/concur.html#landing-slide).
|
||||
In Go 1.5,the runtime now sets the default number of threads to run simultaneously, defined by GOMAXPROCS, to the number of cores available on the CPU.
|
||||
|
||||
Before Go 1.5,The scheduler only uses one thread to run all goroutines, which means it only implements concurrency. If you want to use more CPU cores in order to take advantage of parallel processing, you have to call runtime.GOMAXPROCS(n) to set the number of cores you want to use. If `n<1`, it changes nothing.
|
||||
|
||||
## channels
|
||||
|
||||
|
||||
Reference in New Issue
Block a user