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

Consumed element nulling inconsistency between MPSC impls? #252

Closed
njhill opened this issue Jun 28, 2019 · 1 comment
Closed

Consumed element nulling inconsistency between MPSC impls? #252

njhill opened this issue Jun 28, 2019 · 1 comment

Comments

@njhill
Copy link
Contributor

njhill commented Jun 28, 2019

I noticed that BaseMpscLinkedArrayQueue and MpscBlockingConsumerQueue use soElement(buffer, offset, null) but MpscArrayQueue uses spElement(buffer, offset, null), and could not think of a reason for the difference.

I know for correctness plain is fine so assumed if the so is intentional it must be GC-related, but then why the inconsistency?

@franz1981
Copy link
Collaborator

franz1981 commented Jun 29, 2019

I know for correctness plain is fine so assumed if the so is intentional it must be GC-related, but then why the inconsistency?

IIRC both the queues make use of consumerIndex release on producer side to wide the producerLimit so they could both make use of spElement on consumer side without breaking anything IMO.
I don't see particular reasons for this difference, sometime it just happens: performance wise there is a very small difference (if none TBH) between the 2s and I think is a change that can be proposed with no fear 👍

@nitsanw nitsanw closed this as completed in 6f88bf5 Nov 6, 2019
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

2 participants