property ChannelOptions.onDemand

Called once, when a consumer first attaches. A producer that can defer starting should start here: it is the difference between a buffer that stays near empty and one that races ahead of a consumer that has not arrived.

Type

() => void

Usage

import { type ChannelOptions } from "lib/stream/stream.ts";