RxJava v2.0.1 發布,一個實現異步操作的庫

jopen 8年前發布 | 8K 次閱讀 RxJava Java VM Android

 

RxJava一個在 Java VM 上使用可觀測的序列來組成異步的、基于事件的程序的庫。說到根上,它就是一個實現異步操作的庫,而別的定語都是基于這之上的。同樣是做異步,為什么人們用它,而不用現成的 AsyncTask / Handler / XXX / ... ?,原因是RxJava簡潔,異步操作很關鍵的一點是程序的簡潔性,因為在調度過程比較復雜的情況下,異步代碼經常會既難寫也難被讀懂。 Android 創造的 AsyncTask 和Handler ,其實都是為了讓異步代碼更加簡潔。RxJava 的優勢也是簡潔,但它的簡潔的與眾不同之處在于,隨著程序邏輯變得越來越復雜,它依然能夠保持簡潔。

更新日志

API增強

  • Pull 4827: Porting the Scheduler.when operator from 1.x to 2.x
  • Pull 4831: add Flowable.doFinally(Action) for handling post-terminal or cancel cleanup.
  • Pull 4832: add doFinally to the rest of the reactive base classes
  • Pull 4833: add Flowable.doAfterNext operator
  • Pull 4835: add Observable.doAfterNext and {Single|Maybe}.doAfterSuccess.
  • Pull 4838: add fluent TestSubscriber.requestMore

文檔修復/增強

  • Pull 4793: Fix javadoc mentioning IllegalArgumentException instead of NullPointerException for calling with null parameter(s).
  • Pull 4798: Fix Observable.toFlowable documentation
  • Pull 4803: Fix ObservableEmitter mentioning FlowableEmitter.
  • Pull 4810: Fix Completable.retryWhen terminology about signal emission.
  • Pull 4815: Fix typo in javadoc of Maybe.toSingle
  • Pull 4839: fix wording of some operators, remove @throws implications

Bug修復

  • Pull 4783: Fix Observable.repeatWhen & retryWhen not disposing the inner.
  • Pull 4819: Fix Observable.repeatWhen not reacting to upstream onError properly.

下載

 

本站原創,轉載時保留以下信息:
本文轉自:深度開源(open-open.com)
原文地址:http://www.baiduhome.net/news/view/4eef8b58

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!