Greenrobot EventBus和Guava的EventBus之间的差异

问题描述 投票:14回答:4

我一直在使用来自greenrobot的EventBus

https://github.com/greenrobot/EventBus

但我刚刚意识到Guava有自己的EventBus

com.google.common.eventbus.EventBus

有人知道是否存在很大差异?

android event-bus greenrobot-eventbus
4个回答
13
投票

两者都是优质图书馆。

这是绿色机器人qazxsw poi和comparisonEventBus专门为android设计的一个叉子)之间的qazxsw poi(来自greenrobot开发者的观点)。

我个人喜欢Otto,因为它支持后台线程交付


7
投票

不再需要比较Guava被弃用的地方并写下注释:

该项目已被弃用,有利于RxJava和EventBus


2
投票

EventBus可以执行一些Android特定的技巧,其他实现不支持。首先,主线程支持方便地切换线程。其次,它的性能特别针对Android进行了优化。例如,使用EventBus 3,您可以获得注释,而无需使用Otto或Guava进行性能降级。


0
投票

Otto不赞成使用RxJava和RxAndroid。

RxJava 1.x截止日期为2018年3月31日。

我想是使用otto

© www.soinside.com 2019 - 2024. All rights reserved.