SPSCQ capacity assert. #44
Unanswered
AsherValentini
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
hi, nice catch! I absolutely missed this corner case |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi :)
I was just looking over this repo's SPSCQ's ctr, and would like to ask a question regarding the Capacity assertions.
Two assertion are made:
This setup allows the SPSCQ to be constructed with a Capacity of 1?
A buffer with this capacity will always look full and always look empty, no?
I doubt that the buffer will ever be ctr'd with a capacity of 1, but since we are placing strict'ish construction rails, would it not be best to ensure a Capacity > 1 and a Capacity = 2^k.
Am I off the mark here, or is this an industry norm I am just not used to...
All the best,
Ash
Beta Was this translation helpful? Give feedback.
All reactions