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

MpmcUnboundedXaddArrayQueue spin load ref on offer #258

Open
franz1981 opened this issue Jul 29, 2019 · 0 comments
Open

MpmcUnboundedXaddArrayQueue spin load ref on offer #258

franz1981 opened this issue Jul 29, 2019 · 0 comments

Comments

@franz1981
Copy link
Collaborator

franz1981 commented Jul 29, 2019

I'm not very proud to have introduced this

if (isPooled)
{
//wait any previous consumer to finish its job
while (producerBuffer.lvElement(pOffset) != null)
{
}
}

Given that the xadd q has to wait that a consumer complete its job before offering a new element, I don't see alternatives to perform a spin loop of some kind, but by changing the chunk sequence logic, maybe I can turn it in a spin loop on the sequence value instead: I see some benefit from this (intuitively, so nothing more then a spider-sense), but they have yet to be proved. @nitsanw wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants