LiveEventBus icon indicating copy to clipboard operation
LiveEventBus copied to clipboard

SingleLiveEvent的問題

Open CMingTseng opened this issue 6 years ago • 1 comments

這是線程安全(thread-safe)的嗎?

以下這篇指出

SingleLiveEvent的問題

https://proandroiddev.com/livedata-with-single-events-2395dea972a8

然後提出解法

https://github.com/hadilq/LiveEvent

有納入考慮嗎?

謝謝

CMingTseng avatar Nov 26 '19 07:11 CMingTseng

是线程安全的,因为即使在非主线程post,也会转到主线程,所以不会有线程安全问题

JeremyLiao avatar Nov 27 '19 02:11 JeremyLiao