diff options
author | Andrew Gerrand <adg@golang.org> | 2010-02-22 16:51:28 -0800 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2010-02-22 16:51:28 -0800 |
commit | 2551cf9d1a8760c187540224c5ed796aef7f2f7b (patch) | |
tree | 31945b16b521e8d39df0f3243632b1ace310d38a /doc/go_mem.html | |
parent | b0fba898ef172bb4d99155e725b795ff6fe97ad8 (diff) | |
download | go-2551cf9d1a8760c187540224c5ed796aef7f2f7b.tar.gz go-2551cf9d1a8760c187540224c5ed796aef7f2f7b.zip |
go_mem: clarified unbuffered channel sync example
R=rsc
CC=golang-dev
https://golang.org/cl/218063
Diffstat (limited to 'doc/go_mem.html')
-rw-r--r-- | doc/go_mem.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/go_mem.html b/doc/go_mem.html index ede79720a6..4772bc2178 100644 --- a/doc/go_mem.html +++ b/doc/go_mem.html @@ -190,7 +190,8 @@ the send on that channel completes. </p> <p> -This program: +This program (as above, but with the send and receive statements swapped and +using an unbuffered channel): </p> <pre> @@ -222,7 +223,7 @@ before the <code>print</code>. If the channel were buffered (e.g., <code>c = make(chan int, 1)</code>) then the program would not be guaranteed to print <code>"hello, world"</code>. (It might print the empty string; -it cannot print <code>"hello, sailor"</code>, nor can it crash.) +it cannot print <code>"goodbye, universe"</code>, nor can it crash.) </p> <h3>Locks</h3> |