Rebuild
This commit is contained in:
parent
25cf6d9e69
commit
7d87b1b9f0
@ -1,2 +1,2 @@
|
||||
fb913ae361c41095a39bb3fa0c5e9dcd54ec840e
|
||||
4oOz0j29MJ6
|
||||
79963f30cb3ca93d559a409e3ded40c2bb64df66
|
||||
gyr0NbVKBVf
|
||||
|
4
public/timeouts
generated
4
public/timeouts
generated
@ -44,7 +44,7 @@ elegant thanks to channels and <code>select</code>.</p>
|
||||
|
||||
</td>
|
||||
<td class="code leading">
|
||||
<a href="http://play.golang.org/p/4oOz0j29MJ6"><img title="Run code" src="play.png" class="run" /></a><img title="Copy code" src="clipboard.png" class="copy" />
|
||||
<a href="http://play.golang.org/p/gyr0NbVKBVf"><img title="Run code" src="play.png" class="run" /></a><img title="Copy code" src="clipboard.png" class="copy" />
|
||||
<div class="highlight"><pre><span class="kn">package</span> <span class="nx">main</span>
|
||||
</pre></div>
|
||||
|
||||
@ -103,7 +103,7 @@ channel is never read.</p>
|
||||
<tr>
|
||||
<td class="docs">
|
||||
<p>Here’s the <code>select</code> implementing a timeout.
|
||||
<code>res := <-c1</code> awaits the result and <code><-Time.After</code>
|
||||
<code>res := <-c1</code> awaits the result and <code><-time.After</code>
|
||||
awaits a value to be sent after the timeout of
|
||||
1s. Since <code>select</code> proceeds with the first
|
||||
receive that’s ready, we’ll take the timeout case
|
||||
|
Loading…
x
Reference in New Issue
Block a user