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

Avoid lambda capture of cancellation token #23014

Merged
merged 1 commit into from
Oct 16, 2020
Merged

Avoid lambda capture of cancellation token #23014

merged 1 commit into from
Oct 16, 2020

Conversation

tkp1n
Copy link
Contributor

@tkp1n tkp1n commented Oct 16, 2020

Avoid lambda capture of cancellation token in ExecuteAsync

@AndriySvyryd AndriySvyryd self-assigned this Oct 16, 2020
@AndriySvyryd AndriySvyryd merged commit 5a8784e into dotnet:main Oct 16, 2020
@AndriySvyryd
Copy link
Member

Thanks for your contribution.

@Saibamen
Copy link

What does this fix?

@roji
Copy link
Member

roji commented Oct 17, 2020

@Saibamen it doesn't fix a bug, but reduces heap allocations by removing a closure (because of the reference, inside a lambda, to a local variable outside of it). This is a good post to read.

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.

5 participants