Skip to content

windows-reactor dispatcher and internals review#4566

Merged
kennykerr merged 1 commit into
masterfrom
reactor-dispatcher
Jun 11, 2026
Merged

windows-reactor dispatcher and internals review#4566
kennykerr merged 1 commit into
masterfrom
reactor-dispatcher

Conversation

@kennykerr

Copy link
Copy Markdown
Collaborator

Minor review and clean up of the dispatcher queue priority.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors windows-reactor dispatcher priority handling to use WinUI’s DispatcherQueuePriority throughout, and updates contributor docs to better reflect current reactor internals and optimization ideas.

Changes:

  • Replace the crate-local DispatchPriority with a re-export of DispatcherQueuePriority, updating dispatchers and tests accordingly.
  • Simplify WinUI dispatcher enqueue logic to always use TryEnqueueWithPriority.
  • Refresh docs/reactor-internals.md (codegen pipeline, threading/TLS inventory, and optimization notes).

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/reactor-internals.md Documentation cleanup + updated internals/optimization notes.
crates/tools/reactor/src/main.rs Unify “write-if-changed” helpers and add optional rustfmt formatting toggle.
crates/libs/reactor/src/core/dispatcher.rs Dispatcher API now takes DispatcherQueuePriority and updates internal test dispatchers.
crates/libs/reactor/src/core/render_host.rs Update render scheduling to use DispatcherQueuePriority::{Normal,Low}.
crates/libs/reactor/src/winui/dispatcher.rs Use TryEnqueueWithPriority for all priorities.
crates/tests/libs/reactor/tests/todo_smoke.rs Update test dispatcher impl to new priority type.
crates/tests/libs/reactor/tests/render_stats.rs Update test dispatcher impl to new priority type.
crates/tests/libs/reactor/tests/render_loop_coalesce.rs Update priority-capturing dispatcher + assertions to new priority type.
crates/tests/libs/reactor/tests/host_effects.rs Update queued job priority type to new priority type.
crates/tests/libs/reactor/tests/dispatcher.rs Update RunOnDemandDispatcher tests to new priority type.

Comment thread crates/tools/reactor/src/main.rs
Comment thread crates/libs/reactor/src/core/dispatcher.rs
@kennykerr kennykerr merged commit 264a6e0 into master Jun 11, 2026
31 checks passed
@kennykerr kennykerr deleted the reactor-dispatcher branch June 11, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants