Skip to content

enhance: use Dispatcher.UIThread.Post to hand refresh results to the UI thread - #2871

Open
bertyhell wants to merge 1 commit into
sourcegit-scm:developfrom
bertyhell:perf/post-instead-of-invoke
Open

bertyhell wants to merge 1 commit into
sourcegit-scm:developfrom
bertyhell:perf/post-instead-of-invoke

Conversation

@bertyhell

Copy link
Copy Markdown

The background refresh tasks (branches, worktrees, tags, commits, submodules,
local changes, stashes) and notification dispatching used the synchronous
Dispatcher.UIThread.Invoke, which blocks a thread-pool thread until the UI
thread has processed the update. Nothing after these calls depends on the UI
update having completed (cancellation is still checked inside the lambdas), so
post the updates instead.

🤖 Generated with Claude Code

…e UI thread

The background refresh tasks (branches, worktrees, tags, commits, submodules,
local changes, stashes) and notification dispatching used the synchronous
`Dispatcher.UIThread.Invoke`, which blocks a thread-pool thread until the UI
thread has processed the update. Nothing after these calls depends on the UI
update having completed (cancellation is still checked inside the lambdas), so
post the updates instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KCxH1zwDXLd9kfAAkcf6PZ

This branch has not been deployed

No deployments
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