Skip to content

clojure.core.async/mult

View this page on ClojureDocs

Type: function Added: Clojure unknown Examples: 2 Runnable: 0
([ch])

Creates and returns a mult(iple) of the supplied channel. Channels containing copies of the channel can be created with 'tap', and detached with 'untap'.

Each item is distributed to all taps in parallel and synchronously, i.e. each tap must accept before the next item is distributed. Use buffering/windowing to prevent slow taps from holding up the mult.

Items received when there are no taps get dropped.

If a tap puts to a closed channel, it will be removed from the mult.

Examples

by runexec on . May have evaluation errors.
by cuneoPauloCesar on . May have evaluation errors.

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.