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
ae8d8abf
Commit
ae8d8abf
authored
Mar 23, 2012
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codewalk/sharemem.xml: fix references to files
R=golang-dev, iant CC=golang-dev
https://golang.org/cl/5877064
parent
43ad726f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
sharemem.xml
doc/codewalk/sharemem.xml
+4
-4
No files found.
doc/codewalk/sharemem.xml
View file @
ae8d8abf
...
...
@@ -65,7 +65,7 @@ and then loops passing completed Resources back to the pending
channel after appropriate delays.
</step>
<step
title=
"Creating channels"
src=
"doc/codewalk/urlpoll.go:/
c
reate our/,/complete/"
>
<step
title=
"Creating channels"
src=
"doc/codewalk/urlpoll.go:/
C
reate our/,/complete/"
>
First, main makes two channels of *Resource, pending and complete.
<br/><br/>
Inside main, a new goroutine sends one Resource per URL to pending
...
...
@@ -75,7 +75,7 @@ The pending and complete channels are passed to each of the Poller
goroutines, within which they are known as in and out.
</step>
<step
title=
"Initializing StateMonitor"
src=
"doc/codewalk/urlpoll.go:/
l
aunch the StateMonitor/,/statusInterval/"
>
<step
title=
"Initializing StateMonitor"
src=
"doc/codewalk/urlpoll.go:/
L
aunch the StateMonitor/,/statusInterval/"
>
StateMonitor will initialize and launch a goroutine that stores the state
of each Resource. We will look at this function in detail later.
<br/><br/>
...
...
@@ -83,14 +83,14 @@ For now, the important thing to note is that it returns a channel of State,
which is saved as status and passed to the Poller goroutines.
</step>
<step
title=
"Launching Poller goroutines"
src=
"doc/codewalk/urlpoll.go:/
l
aunch some Poller/,/}/"
>
<step
title=
"Launching Poller goroutines"
src=
"doc/codewalk/urlpoll.go:/
L
aunch some Poller/,/}/"
>
Now that it has the necessary channels, main launches a number of
Poller goroutines, passing the channels as arguments.
The channels provide the means of communication between the main, Poller, and
StateMonitor goroutines.
</step>
<step
title=
"Send Resources to pending"
src=
"doc/codewalk/urlpoll.go:/
s
end some Resources/,/}\(\)/"
>
<step
title=
"Send Resources to pending"
src=
"doc/codewalk/urlpoll.go:/
S
end some Resources/,/}\(\)/"
>
To add the initial work to the system, main starts a new goroutine
that allocates and sends one Resource per URL to pending.
<br/><br/>
...
...
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