]> Cypherpunks.ru repositories - gostls13.git/commitdiff
doc: go_mem: clarify Once docs
authorIan Lance Taylor <iant@golang.org>
Fri, 21 Dec 2018 19:16:43 +0000 (11:16 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 21 Dec 2018 21:46:38 +0000 (21:46 +0000)
Fixes #27808

Change-Id: Ia643d51004c47953642a2ba41dfed281f1112be6
Reviewed-on: https://go-review.googlesource.com/c/155637
Reviewed-by: Bryan C. Mills <bcmills@google.com>
doc/go_mem.html

index 143f3b2ff22e9d52047b05954f8e37aa1ff19b50..d355bebaed8815733cb234347aef37b11476764b 100644 (file)
@@ -418,8 +418,12 @@ func twoprint() {
 </pre>
 
 <p>
-calling <code>twoprint</code> causes <code>"hello, world"</code> to be printed twice.
-The first call to <code>doprint</code> runs <code>setup</code> once.
+calling <code>twoprint</code> will call <code>setup</code> exactly
+once.
+The <code>setup</code> function will complete before either call
+of <code>print</code>.
+The result will be that <code>"hello, world"</code> will be printed
+twice.
 </p>
 
 <h2>Incorrect synchronization</h2>