spawn

Function spawn 

Source
pub fn spawn(
    cancel: CancellationToken,
    state: Arc<AppState>,
    clock: ClockHandle,
) -> RuntimeHandle
Expand description

Spawn the reducer + worker constellation. Returns a RuntimeHandle the caller wires into the server shutdown drain.

clock and state are the only external dependencies. Workers obtain everything else (DB handles, manifest cache, etc.) from state.