Commit e7c20b79 authored by Ian Lance Taylor's avatar Ian Lance Taylor

doc: go_mem: clarify Once docs

Fixes #27808

Change-Id: Ia643d51004c47953642a2ba41dfed281f1112be6
Reviewed-on: https://go-review.googlesource.com/c/155637Reviewed-by: 's avatarBryan C. Mills <bcmills@google.com>
parent b7451e29
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment