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

Manually track capacity of groups #177

Merged

Conversation

matheus-consoli
Copy link
Collaborator

the spiritual successor of #172 (a much simpler implementation)

The problem with using the Slab capacity as the group capacity is that the slab has its own growth rate, which differs from the other internal structures. It was possible that the slab had the capacity for more items, but the rest of the structures didn't (I think this was the problem in #168).

The solution for this is explicitly tracking the capacity inside the group.

This also provides a new reserve method on FuturesGroup and StreamGroup, so the user can prepare the group beforehand to receive more items.

Closes #169

@matheus-consoli matheus-consoli force-pushed the better-capacity-for-groups branch from 71af035 to bd57bc4 Compare April 12, 2024 01:20
Copy link
Owner

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

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

this looks great; thank you!

@yoshuawuyts yoshuawuyts merged commit a6a7868 into yoshuawuyts:main Apr 12, 2024
5 checks passed
@matheus-consoli matheus-consoli deleted the better-capacity-for-groups branch April 15, 2024 21: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.

Implement better capacity in our group structures
2 participants