Skip to content
Browse files

Update docs.

  • Loading branch information...
1 parent 05ac676 commit e801a5887f56f39041146e7334266f7f26eb4dab @markrickert markrickert committed
Showing with 24 additions and 2 deletions.
  1. +24 −2 index.html
View
26 index.html
@@ -77,10 +77,10 @@
</div>
-<p>If you using Bundler:</p>
+<p>If you use Bundler:</p>
<div class="highlight">
-<pre><span class="n">gem</span> <span class="s2">"bubble-wrap"</span><span class="p">,</span> <span class="s2">"~&gt; 1.9.1"</span>
+<pre><span class="n">gem</span> <span class="s2">"bubble-wrap"</span><span class="p">,</span> <span class="s2">"~&gt; 1.9.2"</span>
</pre>
</div>
@@ -1318,6 +1318,28 @@
</div>
+<h4>DependentDeferrable</h4>
+
+<p><code>DependentDeferrable</code> depends on children deferrables. A <code>DependentDeferrable</code>
+succeeds only when every child succeeds and fails immediately when any child
+fails</p>
+
+<div class="highlight">
+<pre><span class="o">&gt;</span> <span class="n">d1</span> <span class="o">=</span> <span class="no">EM</span><span class="o">::</span><span class="no">DefaultDeferrable</span><span class="o">.</span><span class="n">new</span>
+<span class="o">=&gt;</span> <span class="c1">#&lt;BubbleWrap::Reactor::DefaultDeferrable:0x10c713750&gt;</span>
+<span class="o">&gt;</span> <span class="n">d2</span> <span class="o">=</span> <span class="no">EM</span><span class="o">::</span><span class="no">DefaultDeferrable</span><span class="o">.</span><span class="n">new</span>
+<span class="o">=&gt;</span> <span class="c1">#&lt;BubbleWrap::Reactor::DefaultDeferrable:0x10370bb10&gt;</span>
+<span class="o">&gt;</span> <span class="n">d</span> <span class="o">=</span> <span class="no">EM</span><span class="o">::</span><span class="no">DependentDeferrable</span><span class="o">.</span><span class="n">on</span><span class="p">(</span><span class="n">d1</span><span class="p">,</span> <span class="n">d2</span><span class="p">)</span>
+<span class="o">=&gt;</span> <span class="c1">#&lt;BubbleWrap::Reactor::DependentDeferrable:0x106c17b80&gt;</span>
+<span class="o">&gt;</span> <span class="n">d</span><span class="o">.</span><span class="n">callback</span> <span class="p">{</span><span class="o">|</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="o">|</span> <span class="nb">puts</span> <span class="s2">"a: </span><span class="si">#{</span><span class="n">a</span><span class="si">}</span><span class="s2"> b: </span><span class="si">#{</span><span class="n">b</span><span class="si">}</span><span class="s2">"</span><span class="p">}</span>
+<span class="o">=&gt;</span> <span class="o">[</span><span class="c1">#&lt;Proc:0x103075210&gt;]</span>
+<span class="o">&gt;</span> <span class="n">d1</span><span class="o">.</span><span class="n">succeed</span> <span class="s1">'one'</span><span class="p">,</span> <span class="s1">'one more'</span>
+<span class="o">&gt;</span> <span class="n">d2</span><span class="o">.</span><span class="n">succeed</span> <span class="ss">:two</span>
+<span class="ss">a</span><span class="p">:</span> <span class="o">[</span><span class="s2">"one"</span><span class="p">,</span> <span class="s2">"one more"</span><span class="o">]</span> <span class="ss">b</span><span class="p">:</span> <span class="o">[</span><span class="ss">:two</span><span class="o">]</span>
+</pre>
+</div>
+
+
<h4>ThreadAwareDeferrable</h4>
<div class="highlight">

0 comments on commit e801a58

Please sign in to comment.
Something went wrong with that request. Please try again.