Skip to content

Retain cancel callback until ForEachAsync completes#1981

Merged
idg10 merged 1 commit into
mainfrom
feature/1940-asyncrx-foreachasync-ignores-cancel
Jul 27, 2023
Merged

Retain cancel callback until ForEachAsync completes#1981
idg10 merged 1 commit into
mainfrom
feature/1940-asyncrx-foreachasync-ignores-cancel

Conversation

@idg10

@idg10 idg10 commented Jul 27, 2023

Copy link
Copy Markdown
Collaborator

Resolves #1940

The code that waits for processing to complete was after the closing brace of the using that unregisters the cancellation callback. This meant that it almost immediately unregistered for cancellation notifications. Simply moving that await inside the relevant block addresses this.

@idg10 idg10 self-assigned this Jul 27, 2023
@idg10 idg10 merged commit 5903ac6 into main Jul 27, 2023
@idg10 idg10 deleted the feature/1940-asyncrx-foreachasync-ignores-cancel branch July 27, 2023 21:24
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.

ForEachAsync continues after cancellation token is cancelled

2 participants