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

1.x: fix Spsc queues reporting not empty but then poll() returns null #4005

Merged
merged 1 commit into from
Jun 15, 2016

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Jun 13, 2016

In the spsc queues, the indexes were written before the actual elements and thus a concurrent isEmpty check would report a non-empty queue but a poll would still return null. The fix swaps the two writes.

Note that this an inconsistency in the original JCTools code and not the lack of keeping up with it.

@artem-zinnatullin
Copy link
Contributor

artem-zinnatullin commented Jun 13, 2016

👍

1 similar comment
@stevegury
Copy link
Member

👍

@akarnokd akarnokd merged commit 3261a49 into ReactiveX:1.x Jun 15, 2016
@akarnokd akarnokd deleted the SpscQueueFixes branch June 15, 2016 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants