#49106: fix: run toast creation on background thread
Merged
Description of Change
User reporting Electron apps freezing when notifications come in. This is likely to hang on the COM interface. This PR puts as much possible of the toast creation on a background thread. Unfortunately the show() method of the notification has to be called from the UI thread. Without a fix in Windows this as best as we can do.
Checklist
- PR description included and stakeholders cc'd
-
npm testpasses - tests are changed or added
- relevant API documentation, tutorials, and examples are updated and follow the documentation style guide
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Fixed a Windows notification issue where clicking a native notification would result in an application hang on certain Windows environments.
Backports
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron