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

Delay freeing Slab ids until events are processed #156

Merged
merged 2 commits into from
Oct 5, 2023
Merged

Conversation

Drakulix
Copy link
Member

@Drakulix Drakulix commented Oct 4, 2023

Seems to solve #155 for me as well.

@Drakulix Drakulix requested a review from elinorbgr October 4, 2023 16:08
@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (7ae6f36) 86.84% compared to head (c219880) 86.87%.

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     
Flag Coverage Δ
macos-latest 85.93% <94.11%> (+0.04%) ⬆️
ubuntu-latest 86.42% <94.11%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/io.rs 73.93% <100.00%> (ø)
src/loop_logic.rs 87.67% <93.93%> (+0.13%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -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>>>>,
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Is this sufficient?

CHANGELOG.md Show resolved Hide resolved
@elinorbgr
Copy link
Member

Could you also integrate the test case from #155 in the PR, to make sure we're not missing anything?

@elinorbgr
Copy link
Member

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.

@elinorbgr
Copy link
Member

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.

src/loop_logic.rs Outdated Show resolved Hide resolved
Co-authored-by: Elinor B. <[email protected]>
@elinorbgr elinorbgr merged commit 3cb03fb into master Oct 5, 2023
12 checks passed
@Drakulix Drakulix deleted the zombies branch October 25, 2023 11:05
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.

3 participants