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

RetryableFileReader: account for user interrupts #7801

Merged
merged 6 commits into from
Oct 17, 2024
Merged

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Oct 17, 2024

This makes sure RetryableFileReader polls for user interrupts where necessary, so a non-terminated RRD file never hangs the user's process for the rest of times.

I tried various simpler approaches, but they all failed because... well, you know, UNIX signals.
In the end I'm actually not too unhappy with this, really.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@teh-cmc
Copy link
Member Author

teh-cmc commented Oct 17, 2024

@rerun-bot full-check

Copy link

@teh-cmc teh-cmc added 🪳 bug Something isn't working 🐍 Python API Python logging API exclude from changelog PRs with this won't show up in CHANGELOG.md 🪵 Log & send APIs Affects the user-facing API for all languages labels Oct 17, 2024
@teh-cmc
Copy link
Member Author

teh-cmc commented Oct 17, 2024

@rerun-bot full-check

@teh-cmc teh-cmc closed this Oct 17, 2024
@teh-cmc teh-cmc reopened this Oct 17, 2024
Copy link

@teh-cmc teh-cmc marked this pull request as ready for review October 17, 2024 11:36
Copy link
Contributor

@zehiko zehiko left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for taking care of this

@teh-cmc
Copy link
Member Author

teh-cmc commented Oct 17, 2024

@rerun-bot full-check

Copy link

@teh-cmc
Copy link
Member Author

teh-cmc commented Oct 17, 2024

@rerun-bot full-check

Copy link

@teh-cmc
Copy link
Member Author

teh-cmc commented Oct 17, 2024

now is not the right time, windows

/// Returns whether a `SIGINT` was ever caught.
///
/// Need to call [`track_sigint`] at least once first.
pub fn was_sigint_ever_caught() -> bool {
Copy link
Member

Choose a reason for hiding this comment

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

This could call track_sigint, making it impossible to forget to call it. And then track_signint could just be made private.

Copy link
Member Author

Choose a reason for hiding this comment

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

It would be too late by then though, you'd always miss the first SIGINT at the very least.

It's still worth doing though, at least if someone forget, SIGINT-spam will still work.

@teh-cmc teh-cmc merged commit 8721eb8 into main Oct 17, 2024
28 checks passed
@teh-cmc teh-cmc deleted the cmc/eos_sigitn branch October 17, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working exclude from changelog PRs with this won't show up in CHANGELOG.md 🪵 Log & send APIs Affects the user-facing API for all languages 🐍 Python API Python logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rr.log_file_from_path just hangs indefinitely
3 participants