Skip to content

Conversation

timvisee
Copy link
Member

@timvisee timvisee commented May 20, 2025

Depends on #6549

Extract the segment building, optimization and change propagation logic into a separate function. This way we can handle cancellation on all errors in a single place.

While this might make the optimization logic a little bit more complex to look at, I do think it's worth it for consistent cancellation handling.

This contains no logic changes, other than cancelling properly on all error paths for segment optimization.

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --all --all-features command?

Copilot

This comment was marked as resolved.

@timvisee timvisee force-pushed the always-handle-cancellation-for-interrupted-optimizations-sub-function branch from 8a4e556 to 96539be Compare May 20, 2025 09:15
Copy link
Member

@agourlay agourlay left a comment

Choose a reason for hiding this comment

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

Not easy to review TBH :)

I could not find logic changes 👍

@agourlay agourlay merged commit a6ba129 into always-handle-cancellation-for-interrupted-optimizations May 20, 2025
16 checks passed
@agourlay agourlay deleted the always-handle-cancellation-for-interrupted-optimizations-sub-function branch May 20, 2025 10:18
agourlay added a commit that referenced this pull request May 20, 2025
* Always run cancelletatiob handle for interrupted optimizations

* Stick to one way of checking cancelation

* Move segment optimization in sub function, cancel in single place (#6557)

* Move segment optimization into separate function, cancel in single place

* Don't use owned lock

* Unify cancellation check

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
generall pushed a commit that referenced this pull request May 22, 2025
* Always run cancelletatiob handle for interrupted optimizations

* Stick to one way of checking cancelation

* Move segment optimization in sub function, cancel in single place (#6557)

* Move segment optimization into separate function, cancel in single place

* Don't use owned lock

* Unify cancellation check

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
n0x29a pushed a commit that referenced this pull request May 23, 2025
* Always run cancelletatiob handle for interrupted optimizations

* Stick to one way of checking cancelation

* Move segment optimization in sub function, cancel in single place (#6557)

* Move segment optimization into separate function, cancel in single place

* Don't use owned lock

* Unify cancellation check

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
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.

2 participants