Skip to content

Conversation

@defacedvr
Copy link

Max_size should be non_neg_integer
Explicitly handle max_size=0 and do nothing but return same struct

Max_size should be non_neg_integer
Explicitly handle max_size=0 and do nothing but return same struct
@defacedvr
Copy link
Author

Hi. What you think about such changes? I found it pretty usable some times to create deque with max_size=0 and use as bounded queue without worries.
When size depend on configuration, you will be able to simply provide 0 and use it like /dev/null.

Anyway, currently it goes to infinity loop, when max_size <= 0

@jhgg
Copy link

jhgg commented Jun 21, 2019

Can you update tests?

@defacedvr
Copy link
Author

Sure. I'll add some tests a little bit later

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