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

ConfigureAwait(false) Changes #351

Merged
merged 1 commit into from
Oct 22, 2023
Merged

ConfigureAwait(false) Changes #351

merged 1 commit into from
Oct 22, 2023

Conversation

bwcurless
Copy link

Changed all awaits to not run continuations on captured context to prevent deadlocks that occur when a tag is read or written from a UI context.

…event deadlocks that occur when a tag is read or written from a UI context.
@timyhac
Copy link
Collaborator

timyhac commented Oct 22, 2023

Yeah nice - I agree with this design decision. Thanks for raising this!

For some reason I always thought that ConfigureAwait(false) kills the context stack, so if you did ConfigureAwait(false) at the low level (e.g. in a library), it would prevent the ability for a top-level async call from continuing on its context. I'm not sure why I thought this..

Given this change, I think it could be useful to add an analyzer to remind us in the future to adopt this choice.

@timyhac timyhac merged commit 4166a52 into libplctag:master Oct 22, 2023
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.

None yet

3 participants