Remove confusing comment about closed channels

Ref #108
This commit is contained in:
Mark McGranaghan 2016-12-27 11:58:50 -08:00
parent cf6b1fe44a
commit c4b8ffdd62
3 changed files with 5 additions and 7 deletions

View File

@ -18,8 +18,7 @@ func main() {
// This `range` iterates over each element as it's
// received from `queue`. Because we `close`d the
// channel above, the iteration terminates after
// receiving the 2 elements. If we didn't `close` it
// we'd block on a 3rd receive in the loop.
// receiving the 2 elements.
for elem := range queue {
fmt.Println(elem)
}

View File

@ -1,2 +1,2 @@
e415b1f2ae531b319bb9aca69b17e7b916511744
WN7NNh9tvh
8b5d8a77e84c34771c5b14af014ecef3f88b2a6c
I63ge2ISDs

View File

@ -42,7 +42,7 @@ values received from a channel.</p>
</td>
<td class="code leading">
<a href="http://play.golang.org/p/WN7NNh9tvh"><img title="Run code" src="play.png" class="run" /></a>
<a href="http://play.golang.org/p/I63ge2ISDs"><img title="Run code" src="play.png" class="run" /></a>
<div class="highlight"><pre><span class="kn">package</span> <span class="nx">main</span>
</pre></div>
@ -94,8 +94,7 @@ values received from a channel.</p>
<p>This <code>range</code> iterates over each element as it&rsquo;s
received from <code>queue</code>. Because we <code>close</code>d the
channel above, the iteration terminates after
receiving the 2 elements. If we didn&rsquo;t <code>close</code> it
we&rsquo;d block on a 3rd receive in the loop.</p>
receiving the 2 elements.</p>
</td>
<td class="code">