Skip to content

Commit cd59563

Browse files
committed
Update doc
1 parent cc72fb7 commit cd59563

12 files changed

+136
-84
lines changed

docs/master/Concurrent/Array.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ <h2>Overview</h2><div class="docstring">
126126
<p class="tag_title">See Also:</p>
127127
<ul class="see">
128128

129-
<li><a href="http://ruby-doc.org/core-2.2.0/Array.html" target="_parent" title="Ruby standard library `Array`">Ruby standard library `Array`</a></li>
129+
<li><a href="http://ruby-doc.org/core/Array.html" target="_parent" title="Ruby standard library `Array`">Ruby standard library `Array`</a></li>
130130

131131
</ul>
132132

docs/master/Concurrent/Async.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -627,12 +627,12 @@ <h3 class="signature first" id="async-instance_method">
627627
<pre class="lines">
628628

629629

630-
422
631-
423
632-
424</pre>
630+
431
631+
432
632+
433</pre>
633633
</td>
634634
<td>
635-
<pre class="code"><span class="info file"># File 'lib/concurrent-ruby/concurrent/async.rb', line 422</span>
635+
<pre class="code"><span class="info file"># File 'lib/concurrent-ruby/concurrent/async.rb', line 431</span>
636636

637637
<span class='kw'>def</span> <span class='id identifier rubyid_async'>async</span>
638638
<span class='ivar'>@__async_delegator__</span>
@@ -735,12 +735,12 @@ <h3 class="signature " id="await-instance_method">
735735
<pre class="lines">
736736

737737

738-
440
739-
441
740-
442</pre>
738+
449
739+
450
740+
451</pre>
741741
</td>
742742
<td>
743-
<pre class="code"><span class="info file"># File 'lib/concurrent-ruby/concurrent/async.rb', line 440</span>
743+
<pre class="code"><span class="info file"># File 'lib/concurrent-ruby/concurrent/async.rb', line 449</span>
744744

745745
<span class='kw'>def</span> <span class='id identifier rubyid_await'>await</span>
746746
<span class='ivar'>@__await_delegator__</span>

docs/master/Concurrent/Channel.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ <h2>Channel Basics</h2>
190190
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_msg'>msg</span>
191191
</code></pre>
192192

193-
<p>By default, channels are <em>unbuffered</em>, meaning that they have a capacity of zero and only accept puts and takes when both a putting and a taking thread are available. If a <code>put</code> is started when there is no taker thread the call will block. As soon as another thread calls <code>take</code> the exchange will occur and both calls will return on their respective threads. Similarly, is a <code>take</code> is started when there is no putting thread the call will block until another thread calls <code>put</code>.</p>
193+
<p>By default, channels are <em>unbuffered</em>, meaning that they have a capacity of zero and only accept puts and takes when both a putting and a taking thread are available. If a <code>put</code> is started when there is no taker thread the call will block. As soon as another thread calls <code>take</code> the exchange will occur and both calls will return on their respective threads. Similarly, if a <code>take</code> is started when there is no putting thread the call will block until another thread calls <code>put</code>.</p>
194194

195195
<p>The following, slightly more complex example, concurrently sums two different halves of a list then combines the results. It uses an unbuffered channel to pass the results from the two goroutines back to the main thread. The main thread blocks on the two <code>take</code> calls until the worker goroutines are done. This example also uses the convenience aliases <span class='object_link'><a href="#<<-instance_method" title="Concurrent::Channel#&lt;&lt; (method)">#&lt;&lt;</a></span> and <span class='object_link'><a href="#~-instance_method" title="Concurrent::Channel#~ (method)">#~</a></span>. Since channels in Go are part of the language, channel operations are performed using special channel operators rather than functions. These operators help clearly indicate that channel operations are being performed. The operator overloads <code>&lt;&lt;</code> for <code>put</code> and <code>~</code> for <code>take</code> help reinforce this idea in Ruby.</p>
196196

@@ -226,7 +226,7 @@ <h2>Channel Buffering</h2>
226226

227227
<h2>Channel Synchronization</h2>
228228

229-
<p>The main purpose of channels is to synchronize operations across goroutines. One common pattern for this is to created a <code>capacity: 1</code> buffered channel which is used to signal that work is complete. The following example calls a <code>worker</code> function on a goroutine and passes it a &quot;done&quot; channel. The main thread then calls <code>take</code> on the &quot;done&quot; channel and blocks until signaled.</p>
229+
<p>The main purpose of channels is to synchronize operations across goroutines. One common pattern for this is to create a <code>capacity: 1</code> buffered channel which is used to signal that work is complete. The following example calls a <code>worker</code> function on a goroutine and passes it a &quot;done&quot; channel. The main thread then calls <code>take</code> on the &quot;done&quot; channel and blocks until signaled.</p>
230230

231231
<pre class="code ruby"><code class="ruby"><span class='kw'>def</span> <span class='id identifier rubyid_worker'>worker</span><span class='lparen'>(</span><span class='id identifier rubyid_done_channel'>done_channel</span><span class='rparen'>)</span>
232232
<span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>working...\n</span><span class='tstring_end'>"</span></span>

docs/master/Concurrent/FixedThreadPool.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -359,17 +359,17 @@ <h3 class="signature first" id="initialize-instance_method">
359359
<pre class="lines">
360360

361361

362-
194
363-
195
364-
196
365-
197
366-
198
367-
199
368-
200
369-
201</pre>
362+
201
363+
202
364+
203
365+
204
366+
205
367+
206
368+
207
369+
208</pre>
370370
</td>
371371
<td>
372-
<pre class="code"><span class="info file"># File 'lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb', line 194</span>
372+
<pre class="code"><span class="info file"># File 'lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb', line 201</span>
373373

374374
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_num_threads'>num_threads</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
375375
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>number of threads must be greater than zero</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_num_threads'>num_threads</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>&lt;</span> <span class='int'>1</span>

docs/master/Concurrent/Hash.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ <h2>Overview</h2><div class="docstring">
115115
<p class="tag_title">See Also:</p>
116116
<ul class="see">
117117

118-
<li><a href="http://ruby-doc.org/core-2.2.0/Hash.html" target="_parent" title="Ruby standard library `Hash`">Ruby standard library `Hash`</a></li>
118+
<li><a href="http://ruby-doc.org/core/Hash.html" target="_parent" title="Ruby standard library `Hash`">Ruby standard library `Hash`</a></li>
119119

120120
</ul>
121121

docs/master/Concurrent/ImmutableStruct.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ <h2>Overview</h2><div class="docstring">
9696
<p class="tag_title">See Also:</p>
9797
<ul class="see">
9898

99-
<li><a href="http://ruby-doc.org/core-2.2.0/Struct.html" target="_parent" title="Ruby standard library `Struct`">Ruby standard library `Struct`</a></li>
99+
<li><a href="http://ruby-doc.org/core/Struct.html" target="_parent" title="Ruby standard library `Struct`">Ruby standard library `Struct`</a></li>
100100

101101
</ul>
102102

docs/master/Concurrent/MutableStruct.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ <h2>Overview</h2><div class="docstring">
9797
<p class="tag_title">See Also:</p>
9898
<ul class="see">
9999

100-
<li><a href="http://ruby-doc.org/core-2.2.0/Struct.html" target="_parent" title="Ruby standard library `Struct`">Ruby standard library `Struct`</a></li>
100+
<li><a href="http://ruby-doc.org/core/Struct.html" target="_parent" title="Ruby standard library `Struct`">Ruby standard library `Struct`</a></li>
101101

102102
</ul>
103103

docs/master/Concurrent/SettableStruct.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h2>Overview</h2><div class="docstring">
9999
<p class="tag_title">See Also:</p>
100100
<ul class="see">
101101

102-
<li><a href="http://ruby-doc.org/core-2.2.0/Struct.html" target="_parent" title="Ruby standard library `Struct`">Ruby standard library `Struct`</a></li>
102+
<li><a href="http://ruby-doc.org/core/Struct.html" target="_parent" title="Ruby standard library `Struct`">Ruby standard library `Struct`</a></li>
103103

104104
<li><a href="http://en.wikipedia.org/wiki/Final_(Java)" target="_parent" title="Java `final` keyword">Java `final` keyword</a></li>
105105

0 commit comments

Comments
 (0)