mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-05 08:57:48 +00:00
`DestinationQueue` holds what waits to go to one destination: PDUs, EDUs, keyed EDUs, presence and receipts, with Python's merge rules and limits. The first thing queued starts its transmission loop as a tokio task, which builds and sends transactions until there is nothing left, as `_transaction_transmission_loop` does. Catch-up, the sticky event backlog and the loop's database work stay Python for now, behind `QueueHooks`. `RustDestinationQueue` is the pyclass the Python facade wraps, and calls those hooks on it. `run_python_awaitable_observed` converts a Python result on the reactor and tells an observer when the awaitable starts and finishes. The loop uses it so tests can tell a loop waiting on the reactor from one with work to do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R5b7Ruy4cgt27Mjq6Ptxbb