Events¶
Holoflow events carry control and status messages independently of tensor data. This page builds on the synchronous execution context introduced in the Holoflow task model. An event contains a direction, a destination or originating node ID, a JSON payload, and a monotonic timestamp. The router moves events between bounded mailboxes; every send and receive operation is non-blocking, and mailbox counters expose successful and dropped traffic.
Event handles currently belong to SyncCtx, so only synchronous tasks can consume or emit events directly. The scheduler binds each synchronous node's reader and writer before execution, while a dedicated router loop calls tick() to move queued events between the UI and node mailboxes.
UI commands are routed to a named task; task notifications are routed back to the UI.
try_push(...) returns false when its bounded mailbox is full. Tasks should choose deliberately whether to log, coalesce, count, or otherwise tolerate a dropped notification; they must not assume delivery.
Camera missed-frame notification¶
The following lifecycle illustrates how a camera source could report a gap without mixing control metadata into its output tensor. It is an example pattern; current camera sources do not yet emit this event.
Frame acquisition continues while the event router carries the missed-frame notification to the UI.
Recording command and completion¶
The recording path uses both event directions. The UI sends start_recording to the node named record. The task drains that command during execute(...), records the configured frame count, then emits recording_finished; validation or write failures emit recording_failed instead.
The start request and completion notification travel through separate bounded mailboxes.
Where to go next¶
- Return to the Holoflow task model.
- Learn how tasks control buffer lifetimes in Storage Ownership.