Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writes out of order when using multiple threads #605

Open
JonasHallFnx opened this issue May 2, 2018 · 0 comments
Open

Writes out of order when using multiple threads #605

JonasHallFnx opened this issue May 2, 2018 · 0 comments

Comments

@JonasHallFnx
Copy link
Contributor

In #504 an ordering issue for writes was solved by having writes enqueued on the computation scheduler. Unfortunately there seems to be a glitch when the emitted messages comes from the event loop sometimes and from other threads sometimes. When another thread than the event loop is used, the BackpressureManagingHandler starts to enqueue writes, but if the next write happens on the event loop then the write is not enqueued. When this happens, there is a chance that the previous write has not been processed on the computation scheduler yet, which makes the writes out of order.

A possible solution is to continue to enqueue messages until the queue is drained. PR coming up.

JonasHallFnx added a commit to FortnoxAB/RxNetty that referenced this issue May 2, 2018
Continue to enqueue writes until queue is drained, to avoid that writes comes out of order when writes are triggered from both the event loop and other threads.

Solves issue ReactiveX#605
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant