Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
2551cf9d
Commit
2551cf9d
authored
Feb 23, 2010
by
Andrew Gerrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go_mem: clarified unbuffered channel sync example
R=rsc CC=golang-dev
https://golang.org/cl/218063
parent
b0fba898
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
go_mem.html
doc/go_mem.html
+3
-2
No files found.
doc/go_mem.html
View file @
2551cf9d
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment