Skip to main content

Module activity

Module activity 

Source
Expand description

Activity: the unit of concurrent execution.

Structs§

Activity
A running activity.
ActivityConfig
Configuration for an activity.
ActivityMetrics
PhasePollContext
Runtime context for SRD-75 phase-level poll. Carried on Activity when the phase declares a poll: block; consumed by the fiber loop after each source-exhaustion event to decide whether to terminate (predicate satisfied or timeout) or rewind and run another iteration.

Enums§

PhasePollTimeoutPolicy
SRD-75 on_timeout policy — see PhasePollContext::on_timeout.

Functions§

declare_adapter_controls
Invoke DriverAdapter::declare_controls for each unique adapter instance against the given parent component, deduping by Arc-pointer identity. The same adapter Arc may be entered into the map under multiple alias keys; this guarantees each physical instance gets exactly one declaration call per invocation of this helper.
terminal_cols
Best-effort terminal column count read off stderr (fd 2) via the TIOCGWINSZ ioctl. Returns None when stderr isn’t a TTY or the call fails. The status renderer (now hosted by nmbrs-tui::log_only_sink) uses this to clamp the rendered status to a single visual row, since a wrap would leave previous-tick text on screen below the cursor — the in-place rewrite only erases from the cursor through end of the current visual line.
truncate_to_width
Truncate s to at most max_cols visible columns, appending an ellipsis when truncation actually elides content. Skips ANSI SGR escape sequences (\x1b[...m) when counting visible width — they consume characters in the string but no terminal columns. The truncation point is always at a character boundary that’s NOT inside an escape sequence, so we never emit a half-broken \x1b[3 to the terminal.