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

First draft of implementing a new blocking queue #207

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

chrisvest
Copy link
Owner

This queue is implemented using a pair of modified unpadded MpmcUnboundedXaddArrayQueues from JCTools.

One queue is used for messages, while another is used for the wait-set. Since the wait-set is a queue, we get fairness from our blocking methods.

A few modifications were necessary, in order to implement a wait-set using the queue. Most importantly, the 'offer' method now returns the claimed producer index, and a pair of 'casEntry' and 'hasEntry' methods has been added, which allow blocking threads to manage their wait-set entries.

The queues have also gotten a 'count' method, which allow us to implement some inspection methods that Stormpot needs.

@chrisvest chrisvest force-pushed the new-queue branch 2 times, most recently from ceda23e to 5bf6989 Compare December 1, 2024 01:01
This queue is implemented using a pair of modified unpadded MpmcUnboundedXaddArrayQueues from JCTools.

One queue is used for messages, while another is used for the wait-set.
Since the wait-set is a queue, we get fairness from our blocking methods.

A few modifications were necessary, in order to implement a wait-set using the queue.
Most importantly, the 'offer' method now returns the claimed producer index, and a pair of 'casEntry' and 'hasEntry' methods has been added, which allow blocking threads to manage their wait-set entries.

The queues have also gotten a 'count' method, which allow us to implement some inspection methods that Stormpot needs.
@chrisvest chrisvest modified the milestone: 4.0 Dec 26, 2024
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.

1 participant