-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Limit max number of elements in a queue #4
Comments
Hmm, interesting. There's no nice way of doing that right now (sorry!). I'll have to think about it. In the meantime, here's a (hackish) workaround: (You can set the initial size of the queue (constructor argument) to the sum total of the producer sizes to reduce dynamic allocation in this workaround.) |
@cameron314 Thanks, I'll try that. |
…arenthese around arithmetic for it (completes issue #4)
I've added a Cheers! |
Thank you, very cool! |
Thank you for this great library!
I was wondering if it's possible to limit a maximum number of elements in a queue (possibly per producer, at compile time)? In some cases it's necessary to prevent unlimited queue growth. I know I can override memory allocation callbacks but maybe there is a simpler way.
The text was updated successfully, but these errors were encountered: