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

Limits #3

Merged
merged 2 commits into from
Mar 14, 2020
Merged

Limits #3

merged 2 commits into from
Mar 14, 2020

Conversation

yoshuawuyts
Copy link
Collaborator

Initializes the limit functionality outlined in #1. This only updates the traits to contain the functionality, and provide the methods. It does not yet enforce the limits, however.

The impl on how to enforce it is probably to create a stream wrapper that returns a tuple of (item, guard) that increments an internal counter if a limit has been set. Then when the guard is dropped, using an AtomicWaker it can wake the stream up to continue polling (while checking capacity).

Either way, this is a required first step to get us forward. Thanks!

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.

1 participant