Skip to content

Store wakers in a Slab instead of a Vec#58

Draft
jplatte wants to merge 2 commits intomainfrom
slab
Draft

Store wakers in a Slab instead of a Vec#58
jplatte wants to merge 2 commits intomainfrom
slab

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