Skip to content

Feature: Cancellation support for TransformAsync#1135

Open
glen-nicol wants to merge 1 commit into
reactivemarbles:mainfrom
glen-nicol:transform_async_cancel
Open

Feature: Cancellation support for TransformAsync#1135
glen-nicol wants to merge 1 commit into
reactivemarbles:mainfrom
glen-nicol:transform_async_cancel

Conversation

@glen-nicol

Copy link
Copy Markdown

Following this discussion I decided to revert back to just an additional overload of TransformAsync instead of using TransferAsyncCancel. I removed the ambiguous overload.

I decided it was best to extend the existing pattern of using the overload with the most parameters and modified existing operators to use the new overload that has the cancellation token parameter and just discarded that argument for the overloads with fewer parameters.

I added support to the List variant too and modified the internals on that one to avoid a cancelation of one from releasing the async lock of another in the same stream.

@JakenVeina JakenVeina force-pushed the transform_async_cancel branch from 1b19eb0 to 49eae8f Compare July 13, 2026 06:25

@JakenVeina JakenVeina left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks alright. Not sure if I completely follow all the exception logic in the List version, but I suppose it makes sense to swallow exceptions related to cancellation. Kinda makes me think Observable.FromAsync() ought to be the one doing that.

I do need to see some tests added for new functionality, though, even if they're mostly performative. If you can add some, great, otherwise I'll get around to it eventually, assuming I've got write access to your branch.

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