First-class core.async channel bridging and stream combinators for fx.
First-class core.async channel bridging and stream combinators for fx.
(chan-alts> ports)(chan-alts> prev-or-ports opts-or-ports)(chan-alts> prev-effect ports opts)Races multiple channel read/write ports, returning [val-or-ret selected-port].
Options map:
:priority - boolean whether to preserve ports order priority (default: false)
:default - fallback default value if all ports would block
:timeout-ms - maximum timeout in ms
Races multiple channel read/write ports, returning `[val-or-ret selected-port]`. Options map: `:priority` - boolean whether to preserve ports order priority (default: false) `:default` - fallback default value if all ports would block `:timeout-ms` - maximum timeout in ms
(chan-close>)(chan-close> chan-or-prev)(chan-close> prev-effect chan)Closes channel chan and completes with nil.
Closes channel `chan` and completes with nil.
(chan-drain>)(chan-drain> chan-or-prev)(chan-drain> prev-effect chan)Consumes all values from chan until it is closed and returns a vector of collected items.
Consumes all values from `chan` until it is closed and returns a vector of collected items.
(chan-pipe> from-chan to-chan)(chan-pipe> from-chan to-chan close?)(chan-pipe> prev-effect from-chan to-chan close?)Pipes elements from from-chan into to-chan. Closes to-chan when from-chan closes unless close? is false.
Pipes elements from `from-chan` into `to-chan`. Closes `to-chan` when `from-chan` closes unless `close?` is false.
(chan-pub> topic-fn)(chan-pub> in-chan topic-fn)(chan-pub> in-chan topic-fn buf-fn)(chan-pub> prev-effect in-chan topic-fn buf-fn)Creates a core.async publication from channel in-chan using routing function topic-fn.
Creates a core.async publication from channel `in-chan` using routing function `topic-fn`.
(chan-put> chan)(chan-put> chan-or-prev val-or-chan)(chan-put> prev-effect chan val)Puts val onto channel chan, parking without blocking OS threads.
Supports threading: (-> val (chan-put> ch)) or (chan-put> ch val).
Puts `val` onto channel `chan`, parking without blocking OS threads. Supports threading: `(-> val (chan-put> ch))` or `(chan-put> ch val)`.
(chan-sub> publication topic out-chan)(chan-sub> publication topic out-chan close?)(chan-sub> prev-effect publication topic out-chan close?)Subscribes out-chan to publication on topic.
Subscribes `out-chan` to `publication` on `topic`.
(chan-take>)(chan-take> chan-or-prev)(chan-take> prev-or-chan opts-or-timeout)(chan-take> prev-effect chan opts)Takes a single element from channel chan, parking without blocking OS threads.
Optional opts map may contain :timeout-ms and :timeout-val.
Takes a single element from channel `chan`, parking without blocking OS threads. Optional `opts` map may contain `:timeout-ms` and `:timeout-val`.
(chan-unsub> publication out-chan)(chan-unsub> publication topic out-chan)(chan-unsub> prev-effect publication topic out-chan)Unsubscribes out-chan from publication on topic (or all topics if nil).
Unsubscribes `out-chan` from `publication` on `topic` (or all topics if nil).
(chan>)(chan> buf-or-n)(chan> buf-or-n xform)(chan> buf-or-n xform ex-handler)Creates a new core.async channel within an effect pipeline.
Supports buffer configurations (number, :sliding, :dropping, :fixed), transducers, and exception handlers.
Creates a new core.async channel within an effect pipeline. Supports buffer configurations (number, `:sliding`, `:dropping`, `:fixed`), transducers, and exception handlers.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |