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

Queue size can be dynamically specified through the constructor #19

Closed
thun-res opened this issue Jan 4, 2024 · 4 comments
Closed

Queue size can be dynamically specified through the constructor #19

thun-res opened this issue Jan 4, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@thun-res
Copy link

thun-res commented Jan 4, 2024

lockfree::mpmc::Queue<int16_t> queue(20);

@DNedic
Copy link
Owner

DNedic commented Jan 4, 2024

Hello @lujuntuan , can you elaborate on how this would work without dynamic allocation?

@thun-res
Copy link
Author

thun-res commented Jan 4, 2024

Hi @DNedic ,I'm sorry that my explanation may not be clear.
The size of the queue is currently specified by template parameters. Can you add the function of dynamically specifying the queue size?

like:
lockfree::mpmc::Queue<int16_t> queue(20);

now is:
lockfree::mpmc::Queue<int16_t, 20> queue;

thanks~

@DNedic
Copy link
Owner

DNedic commented Jan 4, 2024

I'm going to assume you want to be able to dynamically allocate the internal buffer this way. This is not something that we currently intend to support, but I will leave the issue as a feature request.

@DNedic DNedic added the enhancement New feature or request label Jan 4, 2024
@DNedic
Copy link
Owner

DNedic commented Jan 30, 2024

Closing this as I have received no further info and I don't intend to support dynamic allocation inside the library itself.

@DNedic DNedic closed this as completed Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants