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

SequentialCancellable: add cancelCurrent() method #2516

Merged
merged 2 commits into from
Feb 22, 2023

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

In scenarios when SequentialCancellable is used to manage global cancellation, there might be cases when we have to re-subscribe. Cancelling the current Cancellable will allow us to do this.

Modifications:

  • Add SequentialCancellable#cancelCurrent() method;
  • Test the new feature;

Result:

It's possible to cancel only the current Cancellable inside SequentialCancellable and then re-subscribe.

Motivation:

In scenarios when `SequentialCancellable` is used to manage global
cancellation, there might be cases when we have to re-subscribe.
Cancelling the current `Cancellable` will allow us to do this.

Modifications:

- Add `SequentialCancellable#cancelCurrent()` method;
- Test the new feature;

Result:

It's possible to cancel only the current `Cancellable` inside
`SequentialCancellable` and then re-subscribe.
@idelpivnitskiy idelpivnitskiy merged commit d45724d into apple:main Feb 22, 2023
@idelpivnitskiy idelpivnitskiy deleted the cancelCurrent branch February 22, 2023 17:27
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