Skip to content

Cancellable: always catch internal cancellations #18531

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

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

Conversation

majocha
Copy link
Contributor

@majocha majocha commented May 5, 2025

I've been running Visual Studio in debug mode and I noticed a lot of assertions related to cancellation. Cancellable.CheckAndThrow() surfaces as an internal error, despite being in the context of cancellable workflow, for example here:

with e ->
errorR e

This seems benign in real use, but I think is not correct. It's also annoying when trying to test things in debug mode.

The fix is to handle such things in the cancellable builder.

Update: This worked before, and I broke it. This PR just reverts relevant parts of the code.

cc: @auduchinok

Copy link
Contributor

github-actions bot commented May 5, 2025

⚠️ Release notes required, but author opted out

Warning

Author opted out of release notes, check is disabled for this pull request.
cc @dotnet/fsharp-team-msft

@majocha
Copy link
Contributor Author

majocha commented May 5, 2025

I think this worked before and I broke it the previous time I touched this code.

Copy link
Member

@auduchinok auduchinok left a comment

Choose a reason for hiding this comment

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

@majocha Thank you! 🙂

@majocha
Copy link
Contributor Author

majocha commented May 7, 2025

This just reverts a bug recently introduced in #18309. Maybe no release notes needed.

@edgarfgp edgarfgp added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes
Projects
Status: New
Development

Successfully merging this pull request may close these issues.

3 participants