-
Notifications
You must be signed in to change notification settings - Fork 38
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
Delay freeing Slab ids until events are processed #156
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #156 +/- ##
==========================================
+ Coverage 86.84% 86.87% +0.03%
==========================================
Files 14 14
Lines 1817 1829 +12
==========================================
+ Hits 1578 1589 +11
- Misses 239 240 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
@@ -69,7 +69,7 @@ impl RegistrationToken { | |||
|
|||
pub(crate) struct LoopInner<'l, Data> { | |||
pub(crate) poll: RefCell<Poll>, | |||
pub(crate) sources: RefCell<Slab<Rc<dyn EventDispatcher<Data> + 'l>>>, | |||
pub(crate) sources: RefCell<Slab<Option<Rc<dyn EventDispatcher<Data> + 'l>>>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets add a comment here explaining the meaning and role of this Option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this sufficient?
Could you also integrate the test case from #155 in the PR, to make sure we're not missing anything? |
Also, I'm not sure whether the CI failures on macos & freebsd are related to this PR or not, so I'll need to confirm this. |
Ok, the current master CI does pass on those platform, so those are not flukes, looks like this somehow interacted with some subtle platform-specific behavior. |
Co-authored-by: Elinor B. <[email protected]>
Seems to solve #155 for me as well.