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

Use move in WeakRingBuffer where capable. Allow one-sized ring buffers #184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hattonuri
Copy link

@Hattonuri Hattonuri commented Nov 28, 2024

By this time we are not allowed to create one-sized channel just because of asserts

i suppose this is because of:

assert( !c_bExp2 || (m_nCapacity & (m_nCapacity - 1)) == 0 );

but 1 & (0) == 0 . so its a valid power of two

@TomlyYang
Copy link

TomlyYang commented Nov 28, 2024 via email

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.

2 participants