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

Fix operation of MPSC queue #779

Merged
merged 1 commit into from
Jul 13, 2021
Merged

Conversation

LaurentiuCristofor
Copy link
Contributor

This PR fixes the issue I introduced when I modified the code of the MPSC queue. I added comments to explain the situations addressed by the checks in the code and I fixed the url which pointed to a different implementation.

Note: the issue was not hit so far because the way the queue is used right now avoids the special case when an issue could manifest: we're currently only extracting data from the queue when we accumulated enough and we don't attempt to extract the last element (this was originally done to avoid unnecessary producer-consumer concurrency conflicts).

Copy link
Contributor

@senderista senderista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is OK, but I haven't had quite enough sleep to be thinking about lock-free algorithms...

Copy link
Contributor

@simone-gaia simone-gaia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (did a quick check with the provided link)

@LaurentiuCristofor LaurentiuCristofor merged commit c6a3c15 into master Jul 13, 2021
@LaurentiuCristofor LaurentiuCristofor deleted the laur_mpcs_queue_fix branch July 13, 2021 00:59
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

Successfully merging this pull request may close these issues.

3 participants