Skip to content

[PORT] Akka/Akka#27266 - Propagate stream cancellation causes #5949

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

Conversation

Arkatufus
Copy link
Contributor

@Arkatufus Arkatufus commented May 18, 2022

Port of akka/akka#27266 and akka/akka#27547

From the original PR:

This PR is focussed on adding APIs and machinery to provide cancellation causes across stages and reactive streams interfaces. The new APIs are (so far) completely optional:

  • A reactive streams subscription can implement SubscriptionWithCancelException if it wants to support that feature
  • There's a new GraphStage.cancel(cause) method that can be used to provide a cause (otherwise, SubscriptionWithCancelException.NoMoreElementsNeeded is used)
  • There's a new OutHandler.onDownstreamFinished(cause) method to override if you want access to (or to propagate) the cancellation cause. If not overridden it calls the old method.
  • Similar APIs (SubSink etc.) have already also been adapted.

These changes should be completely transparent and only noticeable to those parties that implement the APIs.

@Arkatufus Arkatufus changed the title [PORT] Akka#27266 - Propagate stream cancellation causes [PORT] Akka/Akka#27266 - Propagate stream cancellation causes May 18, 2022
@Arkatufus Arkatufus self-assigned this May 19, 2022
Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

LGTM

@Aaronontheweb Aaronontheweb added this to the 1.5.0 milestone May 19, 2022
@Aaronontheweb
Copy link
Member

@ismaelhamed I'll wait for your comment before merging it; hoping to get this pulled in sometime next week.

@ismaelhamed
Copy link
Member

LGTM.

This felt like a punishment to review. Now I get why @Aaronontheweb sometimes complains about PRs too big ;)

@Aaronontheweb Aaronontheweb merged commit 0e948db into akkadotnet:dev May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants