Skip to content

Run refresh callbacks on the pump that sent them - #75

Merged
trissim merged 2 commits into
mainfrom
fix/refresh-callback-progress-20261006
Oct 6, 2026
Merged

trissim merged 2 commits into
mainfrom
fix/refresh-callback-progress-20261006

Conversation

@trissim

@trissim trissim commented Oct 6, 2026 •

Copy link
Copy Markdown

Screen._invoke_and_clear_callbacks used to await each callback itself, borrowing the screen's task even when the sender was suspended. It now returns early during a batch or when there are no callbacks, computes the visible roots once, and for painted senders calls sender.call_later(callback). A new test checks that an async callback from an app or widget does not run on the screen's task.

@trissim
trissim marked this pull request as ready for review October 6, 2026 11:40
Copilot AI balanced review requested due to automatic review settings October 6, 2026 11:41
@trissim
trissim merged commit c1e7186 into main Oct 6, 2026
2 of 22 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@trissim trissim changed the title Execute admitted refresh callbacks on their original sender pump Run refresh callbacks on the pump that sent them Oct 11, 2026
@trissim
trissim deleted the fix/refresh-callback-progress-20261006 branch October 11, 2026 20:05
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