Repository navigation
Prepare Reactor COM owners for Send and Sync - #5495
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
COM-owner lifetime changes depend on WinUI dispatcher startup and shutdown ordering, but the required Windows test-reactor validation with COM diagnostics was unavailable during review.
No open issues 🎉
What changed in this PR
This PR prepares Reactor's COM owners for future Send + Sync requirements in #5469 without enabling the global bound or changing delegate dispatch.
Changes:
- Move element-factory state and launch callbacks into the UI-thread registry with checked access and owner-thread cleanup.
- Use
OnceLockfor metadata-provider caching and a mutex for drag-feedback state. - Add coverage for wrong-thread access, worker-thread release, and shutdown cancellation.
| File | Description |
|---|---|
crates/tests/libs/reactor/src/drag/source.rs |
Protect drag-feedback state with a mutex. |
crates/tests/libs/reactor/src/callback_lifetime/mod.rs |
Exercise COM access checks and capture cleanup across threads and shutdown. |
crates/tests/libs/reactor/readme.md |
Document callback-lifetime coverage and its boundaries. |
crates/libs/reactor/src/native/winui/virtualization.rs |
Keep element-factory state in the UI-thread registry. |
crates/libs/reactor/src/native/local.rs |
Add checked registry access and error-handling tests. |
crates/libs/reactor/src/native/app_shim.rs |
Use OnceLock caching and UI-owned launch callbacks. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keep element-factory state and launch callbacks in Reactor's existing UI-thread registry, with checked access and owner-thread cleanup. Use OnceLock for the metadata-provider cache.
Cover wrong-thread access, worker-thread release, and shutdown cancellation. Existing delegate dispatch is unchanged. This prepares Reactor for #5469 without enabling the global Send + Sync bound.