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 cap() instead of len() to compute the spooling threshold #62

Merged
merged 5 commits into from
Jan 20, 2025

Conversation

equals215
Copy link
Collaborator

@equals215 equals215 commented Jan 20, 2025

len() provides the size of items in the buffer
cap() provides the size of the allocated underlying array holding the items

cap() is better suited than len() when used to preserve memory usage

@equals215 equals215 self-assigned this Jan 20, 2025
@equals215 equals215 requested a review from CorentinB January 20, 2025 10:02
@equals215 equals215 marked this pull request as draft January 20, 2025 10:06
Copy link
Owner

@CorentinB CorentinB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestThresholdCrossing not passing, can you fix?

@CorentinB CorentinB merged commit 64c28f2 into master Jan 20, 2025
1 check failed
@equals215 equals215 deleted the spooled-use-cap branch January 20, 2025 12:48
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