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

Fix VSTHRD010 transitivity to not mis-fire when invoking async methods #227

Merged
merged 2 commits into from
Mar 31, 2018

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented Mar 17, 2018

Prior to this change VSTHRD010 would transitively mark all methods that called a method that showed a UI thread requirement, including when leaf methods were async and used SwitchToMainThreadAsync. This would then make their async caller have to call ThrowIfNotOnUIThread() which of course is silly since their caller doesn't need to know the threading affinity of the async methods they invoke.

With this change, instead of marking all callers of all UI thread requiring methods, we only mark callers of methods that throw if not invoked on the right thread.

Fixes #226

@AArnott AArnott added this to the v15.7 milestone Mar 17, 2018
@AArnott AArnott self-assigned this Mar 17, 2018
@AArnott AArnott requested review from AlexEyler and jepetty March 17, 2018 15:09
@AArnott AArnott merged commit 12b776d into v15.7 Mar 31, 2018
@AArnott AArnott deleted the dev/andarno/fix226 branch March 31, 2018 20:55
AArnott pushed a commit to AArnott/vs-threading that referenced this pull request Jan 5, 2024
Bumps [powershell](https://github.com/PowerShell/PowerShell) from 7.3.8 to 7.3.9.
- [Release notes](https://github.com/PowerShell/PowerShell/releases)
- [Commits](PowerShell/PowerShell@v7.3.8...v7.3.9)

---
updated-dependencies:
- dependency-name: powershell
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

1 participant