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

Store wakers in a Slab instead of a Vec #58

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Store wakers in a Slab instead of a Vec #58

wants to merge 2 commits into from

Conversation

jplatte
Copy link
Owner

@jplatte jplatte commented Jul 11, 2024

The second commit is the interesting bit, where we drop wakers for subscribers that are no longer waiting for updates due to being dropped... However, we probably also need to catch the case where the subscriber still exists / at least detect waker_key being Some when it is being set.

Note to self: Add tests for both subscribers being dropped early, and subscriber awaiting being timed out.

Closes #42.

@jplatte jplatte force-pushed the slab branch 3 times, most recently from 3860300 to 73ccb62 Compare July 18, 2024 08:08
Copy link
Owner Author

@jplatte jplatte left a comment

Choose a reason for hiding this comment

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

Note to self: drop waker when next / next_ref future is aborted (dropped), not just when subscriber is dropped.

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