feat: park idle task refresh and bound delivery to one callback per turn

This commit is contained in:
2026-10-23 01:50:56 +08:00
parent 5a1cf9d702
commit bd5c91ba99
6 changed files with 58 additions and 12 deletions
+3
View File
@@ -182,3 +182,6 @@ Cancellation checkpoints own explicit VM roots until restored or released. Initi
source_layout uses the same resumable node driver for trees over 64 occurrences even when measure/arrange are intrinsic. Small intrinsic trees retain LayoutRuntime::frame. The larger path keeps LayoutRuntime measurement caches and yields between node calls; structural extraction, bytecode preparation, a single node, settling and paint remain atomic.
Worker idle polls use ReplSession::poll_tasks_incremental with the current viewport map. Scheduler::poll accepts a checked 1..=64 work limit, counting both delivery and ineligible-task cancellation; idle uses one, synchronous compatibility uses 64. Once delivery begins layout, further tasks and window-command projection wait until the saved refresh completes. The viewport stamp allows cancellation of task-induced pending layout without repeating callback effects.