Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

removed sync over async in LazyAsync - #238

Merged
Bettina Heim (bettinaheim) merged 4 commits into
microsoft:masterfrom
filipw:feature/asynclazy
Jun 15, 2020
Merged

removed sync over async in LazyAsync#238
Bettina Heim (bettinaheim) merged 4 commits into
microsoft:masterfrom
filipw:feature/asynclazy

Conversation

@filipw

Copy link
Copy Markdown
Contributor

Updated LazyAsync to not perform sync-over-async (no longer explicitly blocks).
This is detrimental to performance and in places where there is synchronization context (e.g. xUnit tests or non-.NET Core apps) it can lead to deadlocks.

More about this in the great posts from S. Toub and S. Cleary

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lgtm, César Zaragoza Cortés (@cesarzc) for a second set of eyes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, I agree this looks cleaner!

Thanks for this, Filip W (@filipw)!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great!

@bettinaheim
Bettina Heim (bettinaheim) merged commit 73fad8b into microsoft:master Jun 15, 2020
Aniket Sudeep Dalvi (AniketDalvi) pushed a commit that referenced this pull request Jul 1, 2020
Co-authored-by: bettinaheim <34236215+bettinaheim@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants