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

Fix waiting for short periods #3093

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

bugadani
Copy link
Contributor

@bugadani bugadani commented Feb 4, 2025

This PR (built on top of #3083) shortens wait times in tests (which trigger this issue), and sets the interrupt enable sooner, and changes code to work with that.

@bugadani

This comment was marked as outdated.

@bugadani bugadani force-pushed the timer-fix branch 2 times, most recently from e0e7fa7 to 4d17288 Compare February 4, 2025 14:37
impl Drop for AlarmFuture<'_> {
fn drop(&mut self) {
self.alarm.enable_interrupt(false);
self.alarm.clear_interrupt();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Clearing the interrupt here breaks cancellation I think, you ideally want to be able to re-create this future in the future for the same alarm.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah nvm, I don't think the cancellation semantics where ever decided on the timers.

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