RxJava v1.1.6 发布,一个实现异步操作的库

jopen 6年前
   <p style="text-align: center;"><img alt="" src="https://simg.open-open.com/show/27e89a5a287f2aa133ed68e1e8b7e831.png" /></p>    <p>RxJava一个在 Java VM 上使用可观测的序列来组成异步的、基于事件的程序的库。说到根上,它就是一个实现异步操作的库,而别的定语都是基于这之上的。同样是做异步,为什么人们用它,而不用现成的 AsyncTask / Handler / XXX / ... ?,原因是RxJava简洁,异步操作很关键的一点是程序的简洁性,因为在调度过程比较复杂的情况下,异步代码经常会既难写也难被读懂。 Android 创造的 AsyncTask 和Handler ,其实都是为了让异步代码更加简洁。RxJava 的优势也是简洁,但它的简洁的与众不同之处在于,随着程序逻辑变得越来越复杂,它依然能够保持简洁。</p>    <p><img alt="" src="https://simg.open-open.com/show/590895c0b975a817143b0f53b870e71b.jpg" /></p>    <p><img alt="" src="https://simg.open-open.com/show/039f09fd6005089241137560455ed074.png" /></p>    <h2>更新日志</h2>    <h3>API增强</h3>    <ul>     <li><a href="/misc/goto?guid=4958991479528280575">Pull 3934</a>: <code>TestSubscriber</code> extra info on assertion failures</li>     <li><a href="/misc/goto?guid=4958991479616835565">Pull 3948</a>: add <code>Completable.andThen(Completable)</code></li>     <li><a href="/misc/goto?guid=4958991479710492571">Pull 3942</a>: add <code>Completable.subscribe</code> to be safe, add <code>unsafeSubscribe</code> option + <code>RxJavaPlugins</code>hook support</li>     <li><a href="/misc/goto?guid=4958991479796240261">Pull 3936</a>: promote <code>UnicastSubject</code> to be a standard+experimental <code>Subject</code></li>     <li><a href="/misc/goto?guid=4958991479876923091">Pull 3971</a>: add <code>Observable.rebatchRequests</code> operator to change and stabilize request amounts of the downstream.</li>     <li><a href="/misc/goto?guid=4958991479969498070">Pull 3986</a>: add <code>Schedulers.reset()</code> for better testing</li>     <li><a href="/misc/goto?guid=4958991480050553419">Pull 3918</a>: <code>ReplaySubject</code> now supports backpressure</li>    </ul>    <h3>API弃用</h3>    <ul>     <li><a href="/misc/goto?guid=4958991479616835565">Pull 3948</a> deprecate <code>Completable.endWith()</code> in favor of <code>andThen()</code></li>    </ul>    <h3>性能增强</h3>    <ul>     <li><a href="/misc/goto?guid=4958991480148972114">Pull 3470</a>: <code>replay</code> request coordination reduce overhead</li>    </ul>    <p>Bug修复</p>    <ul>     <li><a href="/misc/goto?guid=4958991480231937735">Pull 3924</a>: fix <code>RxRingBuffer</code>-pool depending on the <code>computation</code> scheduler</li>     <li><a href="/misc/goto?guid=4958991480313403765">Pull 3922</a>: fix <code>using()</code> resource cleanup when factory throws or being non-eager</li>     <li><a href="/misc/goto?guid=4958991480397002689">Pull 3941</a>: fix <code>Single.flatMap</code> not composing subscription through</li>     <li><a href="/misc/goto?guid=4958991480486011673">Pull 3958</a>: fix <code>just()</code> construction to call the <code>onCreate</code> execution hook</li>     <li><a href="/misc/goto?guid=4958991480571649733">Pull 3977</a>: Use the correct <code>Throwable</code> to set the cause for <code>CompositeException</code></li>     <li><a href="/misc/goto?guid=4958991480666684930">Pull 4005</a>: Fix Spsc queues reporting not empty but then poll() returns null.</li>    </ul>    <h2>下载</h2>    <ul>     <li><a href="/misc/goto?guid=4958991480747083450" rel="nofollow"><strong>Source code</strong> (zip)</a></li>     <li><a href="/misc/goto?guid=4958991480834994150" rel="nofollow"><strong>Source code</strong> (tar.gz)</a></li>    </ul>    <p> </p>    <p> </p>