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

Always send an ABANDONED message to acknowledge cancellation #448

Closed
wants to merge 1 commit into from

Conversation

mdickinson
Copy link
Member

@mdickinson mdickinson commented Jul 20, 2021

This completes the refactor started in #392

In #392, a task that was cancelled prior to execution starting sent an ABANDONED message instead of a STARTED message; that way we weren't inventing a None return value.

In this PR, a task where cancellation is discovered during execution also sends an ABANDONED message, instead of inventing a return value of None.

Closes #445
Closes #437

@mdickinson mdickinson marked this pull request as draft July 20, 2021 13:04
@mdickinson
Copy link
Member Author

mdickinson commented Jul 20, 2021

Making this a draft; there's an aspect that I want to think about a bit more.

@mdickinson
Copy link
Member Author

there's an aspect that I want to think about a bit more

To elaborate: with the model in this PR, and with TaskCancelled being public, it's possible for target functions to raise TaskCancelled even if the user hasn't requested cancellation via the usual channel, and there may be good reasons to support that usage. But in that case our invariants and state changes need looking at again.

For now, I'm closing this PR. We can revisit when #437 is looked at again.

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.

Make the ABANDONED message type available to use in BaseTask Rename ProgressCancelled exception
1 participant