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

AsyncFIFO[Buffered] initialization is unergonomic #219

Closed
whitequark opened this issue Sep 21, 2019 · 0 comments
Closed

AsyncFIFO[Buffered] initialization is unergonomic #219

whitequark opened this issue Sep 21, 2019 · 0 comments
Milestone

Comments

@whitequark
Copy link
Contributor

Currently, AsyncFIFO fails if you specify a depth that isn't a power of 2, and AsyncFIFOBuffered fails if you specify a depth that isn't a power of 2 plus one. It is rarely useful to request a FIFO that must be the exact size, down to one element, and this can be annoying.

I propose a new argument for the AsyncFIFO/AsyncFIFOBuffered constructor, exact_depth. When True, the current behavior is preserved. When False (the new default), the FIFO will use the smallest available depth that is not less than the requested one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant