Skip to main content

spawn

Function spawn 

Source
pub fn spawn<B: SignalBuilder>(
    cfg: &Arc<Config>,
) -> (Ingest<B::Request>, OpenSlot, Flushers)
Expand description

Start one signal’s ingest pipeline. Returns the handle its receivers push into. Each signal gets its own channels, flusher tasks and block sequences, so a slow flush on one cannot stall another.

Flushers is the shutdown contract: drop every Ingest clone and every shard seals whatever is open, acks everyone waiting on it and returns; the handle resolves once they all have. A caller that exits without awaiting it turns a graceful stop into a reset for those waiters.