Skip to main content

global_observer

Function global_observer 

Source
pub fn global_observer() -> Option<Arc<dyn RunObserver>>
Expand description

The observer the current code should route through. Used by code that needs the observer without threading it through every call site (e.g. the activity’s inline-status refresh thread publishing into [RunObserver::set_status_line]).

SRD-88: a fiber running inside an ExecutionContext resolves to ITS execution’s observer (so concurrent executions route lifecycle/log independently); outside any execution scope — or when the scoped context set no observer — it falls back to the process-global GLOBAL_OBSERVER (the single-run / CLI / test default; axiom A1).