From e7c20b7917989e678a2800378b807fe0fdaf8031 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 21 Dec 2018 11:16:43 -0800 Subject: [PATCH] doc: go_mem: clarify Once docs Fixes #27808 Change-Id: Ia643d51004c47953642a2ba41dfed281f1112be6 Reviewed-on: https://go-review.googlesource.com/c/155637 Reviewed-by: Bryan C. Mills --- doc/go_mem.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/go_mem.html b/doc/go_mem.html index 143f3b2ff2..d355bebaed 100644 --- a/doc/go_mem.html +++ b/doc/go_mem.html @@ -418,8 +418,12 @@ func twoprint() {

-calling twoprint causes "hello, world" to be printed twice. -The first call to doprint runs setup once. +calling twoprint will call setup exactly +once. +The setup function will complete before either call +of print. +The result will be that "hello, world" will be printed +twice.

Incorrect synchronization

-- 2.50.0