Function flush_subscribers

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

pub fn flush_subscribers() -> Result<()>

Wait for all subscriber callbacks queued before this call to finish.

Call this helper outside native subscriber callbacks. A re-entrant call returns without waiting to avoid blocking the dispatcher, so callbacks later in the same dispatch snapshot can still run.

Native targets deliver subscriber callbacks on a background dispatcher so event-producing APIs do not wait for observer work. Call this helper from tests, shutdown paths, or exporter lifecycle code when callers need a deterministic observation barrier.