rx java_RxJava的又一个版本: RxJava3

RxJava出3啦

早上看见一个库支持RxJava3, 还以为自己眼花了, 查了下果然是出RxJava3了.

RxJava2会怎样呢?

RxJava2会进入维护状态, 只有bugfix的改动, 不会有新feature, 到February 28, 2021将会停止所有2.0的开发.

With the release of RxJava 3.0.0, the previous version line, 2.2.x, is in maintenance mode.

This means only bugfixes will be accepted and applied; no new operators or documentation changes will be accepted or applied.

:information_source: 2.x will be supported until February 28, 2021, after which all development on that branch will stop.

RxJava2和RxJava3可以共存.

RxJava3依赖添加

之前RxJava1是这样的:

implementation 'io.reactivex:rxjava:1.3.0

RxJava2是这样的:

implementation 'io.reactivex.rxjava2:rxjava:2.0.9'

现在RxJava3是这样的:

implementation 'io.reactivex.rxjava3:rxjava:3.0.0'

主要改变

Java 8

因为Android Studio 4.0的desugaring, 见: Java 8 library desugaring in D8 and R8, 使用Java 8的一些APIs, 不再限制app的最小API level.

所以RxJava的基准也变为Java 8.

Package

一些包名的改变.

现在的包都是: io.reactivex.rxjava3.

行为改变 Behavior changes

More undeliverable errors

Connectable source reset

Flowable.publish pause

Processor.offer null-check

MulticastProcessor.offer fusion-check

Group abandonment in groupBy

Backpressure in groupBy

Window abandonment in window

CompositeException cause generation

Parameter validation exception change

From-callbacks upfront cancellation

Using cleanup order

API改变

Functional interfaces

New Types

Moved components

API promotions

API additions

Java 8 additions

API renames

API signature changes

API removals

这两部分太长太具体了, 这里只是列出来项目, 大家自己点去原文看吧. What's different in 3.0

参考

欢迎关注微信公众号: 圣骑士Wind

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值