Channel multiplexing (source code)

= Channel multiplexing

Sharing one <message-passing channel> among multiple logical streams by attaching a stream identity to each transferred value. Independent cancellation requires a protocol that conveys which stream is ending; bounded per-stream <flow control> can prevent <head-of-line blocking> from a single unready consumer.