Joseph Doherty 078b9c9840
ci / portable (push) Failing after 13m57s
ci / windows-x86 (push) Successful in 12m20s
ci / java (push) Failing after 40m28s
fix(worker): bound each STA message-pump pass to 64 dispatches (WIP-001, #246)
An unbounded PeekMessage drain never returned while inbound COM callbacks
arrived at least as fast as they dispatched, so the STA loop stopped running
queued commands and stopped stamping LastActivityUtc; the heartbeat watchdog
then faulted a busy apartment as StaHung. The record-info pin raises the
dispatch ceiling a lot but is best-effort, and the drain was still unbounded.

Each pump pass now dispatches at most StaMessagePump.MaxMessagesPerPass (64),
then the loop stamps activity and services the command queue. MWMO_INPUTAVAILABLE
makes the next wait return at once while input remains, so no wakeup is lost.
StaRuntime.PumpPendingMessages (the pump step of ReadBulk/write waits) uses the
same cap so those loops re-check their deadline between slices.

Tests: a fake message flood with a queued command (command runs, activity stays
fresh, no pass exceeds the cap); a real-queue test that a pass stops at the cap.
2026-12-03 09:40:52 -05:00
S
Description
No description provided
42 MiB
Languages
C# 52.7%
Java 35.4%
Python 3%
Rust 2.8%
Go 2.6%
Other 3.4%