-
Notifications
You must be signed in to change notification settings - Fork 148
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
Inherit thread affinity from base types and members #231
Comments
By a derived member are you talking about an
I disagree. There is no guarantee that the caller has the threading analyzers applied to their project with the right analyzer turned to warning/error. At runtime something that requires the UI thread should still throw if it's not called on the UI thread in order to prefer throwing exceptions over deadlocking. |
|
This is fine, but if the behavior is kept it should use a different diagnostic ID. Otherwise it's an overwhelming source of noise for code that defines hundreds or thousands of event handlers for UI events. |
Event handlers I don't mind removing the requirement from under the conditions you proposed. It's members that are accessible in other ways that I think should still defend themselves from improper calling. |
That seems more relevant for a library or application with a public API. For a contained application, it's just noise (all the entry points to affinitized code would be analyzed separately). |
Bumps [powershell](https://github.com/PowerShell/PowerShell) from 7.3.9 to 7.4.0. - [Release notes](https://github.com/PowerShell/PowerShell/releases) - [Commits](PowerShell/PowerShell@v7.3.9...v7.4.0) --- updated-dependencies: - dependency-name: powershell dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Then as a follow-up to the above:
ThrowIfNotOnUIThread
callThe text was updated successfully, but these errors were encountered: