-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
SystemEvents deadlock if UI thread shuts down early #37351
Comments
I couldn't figure out the best area label to add to this issue. Please help me learn by adding exactly one area label. |
Some options to consider are:
If the solution to the issue is opt-in it would probably not solve third party deadlocks, since it will be hard to identify the opt-in would fix the deadlocks. |
This comment has been minimized.
This comment has been minimized.
SystemEvents is not part of WinForms, the WinForms issue is dotnet/winforms#3254, I was asked to open one in the runtime repo who owns SystemEvents. |
This comment has been minimized.
This comment has been minimized.
I couldn't figure out the best area label to add to this issue. Please help me learn by adding exactly one area label. |
This seems reasonable, any drawbacks? cc @JeremyKuhne Given this isn't a regression from and desktop behaved this way for a decade I don't think we need to fix this for 5.0. |
Description
The first thread that accesses
SystemEvents
is used for initialization. If its a MTA thread then a private STA thread with message loop is created for listening to system events, but if the first thread is an STA thread the initialization happens on this thread.The code is not prepared for an STA thread that stops pumping messages or shuts down before process exit.
ProfessionalColorTable_ChangeUserPreferences_GetColor_ReturnsExpected
deadlock winforms#3254)Regression?
No
The text was updated successfully, but these errors were encountered: