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

what is the reason to use write_idx and an additional idx in Block? #2

Open
samplling opened this issue Oct 8, 2022 · 2 comments
Open

Comments

@samplling
Copy link

seems to me either one works

@g302ge
Copy link

g302ge commented Apr 24, 2023

I think this struct is copy from MPMC queue directly. As we know that the MPMC quque need a token semnatics field to making producer and consumer blocking on the queue is full

@g302ge
Copy link

g302ge commented Apr 25, 2023

And there is an assumption, size_t is alwasys enough in practical situatiion, so the WriteIndex should always grater than ReadIndex

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