vapor-chamber API reference - v1.16.0
    Preparing search index...

    Type Alias FastLaneOptions

    type FastLaneOptions = {
        removal?: "live" | "snapshot";
    }
    Index
    removal?: "live" | "snapshot"

    What a mid-emit unsubscribe means for the CURRENT emit. Chosen once at factory time — the emit/unsub closures are built per mode, so the hot path carries zero mode-branching.

    • 'live' (default) — matches the main bus: a listener removed during an emit (by itself or a peer) does NOT run in that emit. Costs an identity guard per listener call.
    • 'snapshot' — the emit fans out to the subscriber list as it was when the emit started; a listener removed mid-emit still runs once. Unsubscribe replaces the bucket array instead of splicing it (the same copy-on-write nanoevents uses), so the emit loop is one call per slot with no guards. Allocation moves to the cold unsub path; the hot path stays allocation-free either way.

    Opt into 'snapshot' only when a measured fan-out hot loop says so — see docs/performance.md §Tuning.