http://codereview.appspot.com/5538050/diff/3006/doc/effective_go.tmpl File doc/effective_go.tmpl (right): http://codereview.appspot.com/5538050/diff/3006/doc/effective_go.tmpl#newcode2565 doc/effective_go.tmpl:2565: <code>runtime.GOMAXPROCS(runtime.NumCPU())</code>). i don't think this is right, exactly. if ...
13 years, 5 months ago
(2012-01-12 15:27:17 UTC)
#4
http://codereview.appspot.com/5538050/diff/3006/doc/effective_go.tmpl
File doc/effective_go.tmpl (right):
http://codereview.appspot.com/5538050/diff/3006/doc/effective_go.tmpl#newcode...
doc/effective_go.tmpl:2565: <code>runtime.GOMAXPROCS(runtime.NumCPU())</code>).
i don't think this is right, exactly. if i say 2*runtime.NumCPU() i also use all
the cores.
this info should be in the(default 1) parenthetical:
(default 1; the function runtime.NumCPU() returns the number of cores on the
machine)
except that's pretty clunky.
if you'd prefer, i'd be happy to rearrange this paragraph to make it work
better.
On 2012/01/12 15:27:17, r wrote: > http://codereview.appspot.com/5538050/diff/3006/doc/effective_go.tmpl > File doc/effective_go.tmpl (right): > > http://codereview.appspot.com/5538050/diff/3006/doc/effective_go.tmpl#newcode2565 > ...
13 years, 5 months ago
(2012-01-12 17:21:13 UTC)
#5
On 2012/01/12 15:27:17, r wrote:
> http://codereview.appspot.com/5538050/diff/3006/doc/effective_go.tmpl
> File doc/effective_go.tmpl (right):
>
>
http://codereview.appspot.com/5538050/diff/3006/doc/effective_go.tmpl#newcode...
> doc/effective_go.tmpl:2565:
<code>runtime.GOMAXPROCS(runtime.NumCPU())</code>).
> i don't think this is right, exactly. if i say 2*runtime.NumCPU() i also use
all
> the cores.
>
> this info should be in the(default 1) parenthetical:
> (default 1; the function runtime.NumCPU() returns the number of cores on the
> machine)
>
> except that's pretty clunky.
>
> if you'd prefer, i'd be happy to rearrange this paragraph to make it work
> better.
PTAL
I've removed the (default 1) remark - the previous text clearly says that only 1
CPU is used by default. I've also rephrased NumCPU wording.
LGTM if you like my edits. http://codereview.appspot.com/5538050/diff/2011/doc/effective_go.tmpl File doc/effective_go.tmpl (right): http://codereview.appspot.com/5538050/diff/2011/doc/effective_go.tmpl#newcode2562 doc/effective_go.tmpl:2562: variable <code>GOMAXPROCS</code> set ...
13 years, 5 months ago
(2012-01-12 17:47:15 UTC)
#6
*** Submitted as http://code.google.com/p/go/source/detail?r=48ac1863c1e2 *** effective_go: provide reference to runtime.NumCPU() R=golang-dev, robert.hencke, r CC=golang-dev http://codereview.appspot.com/5538050
13 years, 5 months ago
(2012-01-12 18:06:57 UTC)
#8
Issue 5538050: code review 5538050: effective_go: provide reference to runtime.NumCPU()
(Closed)
Created 13 years, 5 months ago by dvyukov
Modified 13 years, 5 months ago
Reviewers:
Base URL:
Comments: 5