Skip to content

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

Merged
JC-Chung merged 1 commit into
sourcegit-org:developfrom
bertyhell:perf/post-instead-of-invoke
Nov 20, 2026
Merged

JC-Chung merged 1 commit into
sourcegit-org: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
@love-linger love-linger self-assigned this Nov 20, 2026
@love-linger love-linger added the enhancement New feature or request label Nov 20, 2026
@love-linger love-linger removed their assignment Nov 20, 2026
@love-linger

Copy link
Copy Markdown
Collaborator

Tested. @JC-Chung I think this PR should be merged.

@JC-Chung
JC-Chung merged commit 9bdbc66 into sourcegit-org:develop Nov 20, 2026
14 checks passed
@JC-Chung JC-Chung self-assigned this Nov 20, 2026
@bertyhell
bertyhell deleted the perf/post-instead-of-invoke branch November 20, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants