Skip to content

Return partial results in the condition on interrupt#237

Merged
gaborcsardi merged 3 commits into
mainfrom
feature/partial-results-on-interrupt
May 29, 2026
Merged

Return partial results in the condition on interrupt#237
gaborcsardi merged 3 commits into
mainfrom
feature/partial-results-on-interrupt

Conversation

@gaborcsardi
Copy link
Copy Markdown
Member

Closes #98.

Single line # nocov does not work because air puts it on the wrong line.
@hadley
Copy link
Copy Markdown
Member

hadley commented May 27, 2026

Did you consider just switching to req_perform_iterative() so you could inherit from httr2?

@gaborcsardi
Copy link
Copy Markdown
Member Author

Yeah, I looked at that solution. But it does not seem like a good idea to me to ignore interrupts and return partial results downstream. I think if the user presses an interrupt in an interactive session or sends a SIGINT to a worker subprocess then they want the computation/worker stopped. This is essentially the same concert you had in the issue, hence your top-level restriction suggestion. I think this PR essentially implements that at the top level and has more predictable behavior, i.e. an interrupt will jump to top level.

@gaborcsardi gaborcsardi merged commit 011eb04 into main May 29, 2026
11 checks passed
@gaborcsardi gaborcsardi deleted the feature/partial-results-on-interrupt branch May 29, 2026 09:37
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.

FR: Support returning incomplete results after an interrupt

2 participants