Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Revert change of visible behavior in CancelableOperation. #208

Merged
merged 3 commits into from
Mar 18, 2022

Conversation

lrhn
Copy link
Contributor

@lrhn lrhn commented Mar 16, 2022

A prior change made it so that a .then on a CancelableOperation
would call the onValue/onError callback even if the
returned operation was cancelled beteen the time of the then
and the time the original operation completed.
The result would not show up in the cancelled operation,
but the callbacks would run.

This change blocks calling the callbacks if the returned operation
has been cancelled.

Q.v. #204

A prior change made it so that a `.then` on a `CancelableOperation`
would call the `onValue`/`onError` callback even if the
returned operation was cancelled beteen the time of the `then`
and the time the original operation completed.
The result would not show up in the cancelled operation,
but the callbacks would run.

This change blocks calling the callbacks if the returned operation
has been cancelled.
@lrhn lrhn requested a review from natebosch March 16, 2022 12:44
@lrhn lrhn force-pushed the fix-callbacks-after-cancel branch from c3da3bb to 8f77efd Compare March 16, 2022 12:52
@lrhn lrhn force-pushed the fix-callbacks-after-cancel branch from 8f77efd to 88c0f72 Compare March 16, 2022 12:54
`fail` has a return type of `Never`.
@lrhn lrhn merged commit 82094ce into master Mar 18, 2022
@natebosch natebosch deleted the fix-callbacks-after-cancel branch March 18, 2022 23:09
mosuem pushed a commit to dart-lang/core that referenced this pull request Oct 14, 2024
…hive/async#208)

* Revert change of visible behavior in `CancelableOperation`.

A prior change made it so that a `.then` on a `CancelableOperation`
would call the `onValue`/`onError` callback even if the
returned operation was cancelled beteen the time of the `then`
and the time the original operation completed.
The result would not show up in the cancelled operation,
but the callbacks would run.

This change blocks calling the callbacks if the returned operation
has been cancelled.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants