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
9f48f7e6
Commit
9f48f7e6
authored
Jan 27, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ucsd cns talk, focused on networking
R=r CC=golang-dev
https://golang.org/cl/186230
parent
2ce13ba4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
go_talk-20100112.html
doc/talks/go_talk-20100112.html
+5
-5
go_talk-20100121.html
doc/talks/go_talk-20100121.html
+0
-0
No files found.
doc/talks/go_talk-20100112.html
View file @
9f48f7e6
...
...
@@ -255,15 +255,15 @@ func main() {
<h2>
Use explicit messages to communicate and synchronize.
</h2>
<pre>
func computeAndSend(c chan int, x, y, z int) {
c
<-
expensiveComputation
(
x
,
y
,
z
)
func computeAndSend(c
h
chan int, x, y, z int) {
c
h
<-
expensiveComputation
(
x
,
y
,
z
)
}
func
main
()
{
c
:=
make(chan
int
)
go
computeAndSend
(
c
,
x
,
y
,
z
)
c
h
:=
make(chan
int
)
go
computeAndSend
(
c
h
,
x
,
y
,
z
)
v2
:=
anotherExpensiveComputation(a,
b
,
c
)
v1
:=
<-c
v1
:=
<-c
h
fmt
.
Println
(
v1
,
v2
)
}
</
pre
>
...
...
doc/talks/go_talk-20100121.html
0 → 100644
View file @
9f48f7e6
This diff is collapsed.
Click to expand it.
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