variable ChannelOverflow

A channel with overflow: 'fail' filled up: the consumer fell far enough behind that the buffer could not hold the difference, and dropping was not on the table.

A declared failure rather than a throw, because it is an expected operating condition of a producer nobody can slow down — the two-tier rule puts it in the flow, not in the bug tier.

ChannelOverflow({ capacity: 1_000 }).code; // 'ChannelOverflow'

Type

FailureFactory<"ChannelOverflow", { capacity: number; }>

Usage

import { ChannelOverflow } from "lib/stream/index.ts";