Liking cljdoc? Tell your friends :D

fx.async.channel

First-class core.async channel bridging and stream combinators for fx.

First-class core.async channel bridging and stream combinators for fx.
raw docstring

chan-alts>clj/s

(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
raw docstring

chan-close>clj/s

(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.
raw docstring

chan-drain>clj/s

(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.
raw docstring

chan-pipe>clj/s

(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.
raw docstring

chan-pub>clj/s

(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`.
raw docstring

chan-put>clj/s

(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)`.
raw docstring

chan-sub>clj/s

(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`.
raw docstring

chan-take>clj/s

(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`.
raw docstring

chan-unsub>clj/s

(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).
raw docstring

chan>clj/s

(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.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close