You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivation:
HandlerSubscriber automatically starts requests when calling
onSubscribe.
But when a publisher subscribes, RxJava automatically requests the
Subscription if there are some pending requests.
When such race condition happen, we end up with 2 threads (calling and
event loop) competing for requesting the Subscription. This results is
out of order published messages.
Modification:
Make HandlerSubscriber#onSubscribe noop and actually delay it to after
Publisher has subscribed.
Result:
No more out of order messages.
0 commit comments