Files
Dario Gabriel LipicarandClaude Opus 5 36ab268d09 feat: add whenObjectAvailable(), the call-path counterpart of onEventWhenAvailable()
Event subscribers got a way to ask "tell me when this module is reachable"
without blocking and without giving up on the first no. Callers had no such
thing, so a caller facing the same startup race had only two bad options: fail
fast, which strands a UI that will never retry, or call straight through and sit
in the transport's acquire timeout on whatever thread it was called from — the
GUI thread, in practice.

whenObjectAvailable() reuses the pending-subscription registry that already
exists, as a readiness-only entry: it attaches no subscription, fires its
callback exactly once, and is then forgotten rather than being re-armed on
reconnect, because a one-shot readiness answer that arrives twice is not an
answer. It shares the registry's timer, backoff and diagnostics, so it costs
nothing new on qt_remote and shows up in pendingSubscriptions() as
"<object>::(readiness)" while it waits.

Its first consumer is LogosQmlBridge::callModuleAsync, which can now hold a call
issued before its module exists and dispatch it when the module appears.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 11:44:33 -03:00
..