Default Schedulers for rxjava on Android

前端 未结 4 496
予麋鹿
予麋鹿 2021-01-01 20:32

I\'m using Retrofit to return rxjava Observable\'s for my async network calls.

I find myself repeating the following invocation:

someApiCall().subscrib

4条回答
  •  孤街浪徒
    2021-01-01 20:56

    The Change Log of Retrofit Version 2.0.0-beta2 (2015-09-28) shows subscribeOn() is required for running in the background.

    Fix: Observable and Single-based execution of requests now behave synchronously (and thus requires subscribeOn() for running in the background).

提交回复
热议问题