Liking cljdoc? Tell your friends :D

clojure.more.async


consumeclj

(consume ch f)

Takes values repeatedly from channels and applies f to them.

The opposite of produce.

Stops consuming values when the channel is closed.

Takes values repeatedly from channels and applies f to them.

The opposite of produce.

Stops consuming values when the channel is closed.
sourceraw docstring

consume-blockingclj

(consume-blocking ch f)

Runs consume-blocking* in s thread.

Runs `consume-blocking*` in s thread.
sourceraw docstring

consume-blocking*clj

(consume-blocking* ch f)

Takes values repeatedly from channels and applies f to them.

The opposite of produce.

Stops consuming values when the channel is closed. Like consume but blocking.

Takes values repeatedly from channels and applies f to them.

The opposite of produce.

Stops consuming values when the channel is closed.
Like `consume` but blocking.
sourceraw docstring

consume-blocking?clj

(consume-blocking? ch f)

Runs consume-blocking?* in s thread.

Runs `consume-blocking?*` in s thread.
sourceraw docstring

consume-blocking?*clj

(consume-blocking?* ch f)

Takes values repeatedly from channels and applies f to them. Recurs only when f returns a non false-y value.

The opposite of produce.

Stops consuming values when the channel is closed. Like consume? but blocking.

 Takes values repeatedly from channels and applies f to them.
Recurs only when f returns a non false-y value.

The opposite of produce.

Stops consuming values when the channel is closed.
Like `consume?` but blocking.
sourceraw docstring

consume?clj

(consume? ch f)

Takes values repeatedly from channels and applies f to them. Recurs only when f returns a non false-y value.

The opposite of produce.

Stops consuming values when the channel is closed.

Takes values repeatedly from channels and applies f to them.
Recurs only when f returns a non false-y value.

The opposite of produce.

Stops consuming values when the channel is closed.
sourceraw docstring

fan!clj

(fan! f xf from to)

Partition values from from by f and apply xf to each partition. Useful for stateful transducer operating on streaming partitioned data when the partitions aren't know a priori.

Warnings and caveats: creates a new channel and go block per new partition. Very bad for unbounded inputs.

Partition values from `from` by `f` and apply `xf` to each partition.
Useful for stateful transducer operating on streaming partitioned data
when the partitions aren't know a priori.

Warnings and caveats:
creates a new channel and go block per new partition.
Very bad for unbounded inputs.
sourceraw docstring

merge!clj

(merge! from to)
source

produceclj

(produce ch f)
(produce ch f close?)

Puts the contents repeatedly calling f into the supplied channel.

By default the channel will be closed if f returns nil.

Based on clojure.core.async/onto-chan. Equivalent to (onto-chan ch (repeatedly f)) but cuts out the seq.

Puts the contents repeatedly calling f into the supplied channel.

By default the channel will be closed if f returns nil.

Based on clojure.core.async/onto-chan.
Equivalent to (onto-chan ch (repeatedly f)) but cuts out the seq.
sourceraw docstring

produce-blockingclj

(produce-blocking ch f)
(produce-blocking ch f close?)

Like produce-blocking* but takes a thread.

Like `produce-blocking*` but takes a thread.
sourceraw docstring

produce-blocking*clj

(produce-blocking* ch f close?)

Like produce but blocking.

Like `produce` but blocking.
sourceraw docstring

produce-bound-blockingclj

(produce-bound-blocking ch f close? pre post)

Like produce-blocking, but calls pre and post in the context of the thread. The value returned by pre is passed to f and post. pre is called before the loop, post after it exhausts.

Useful for non thread safe objects which throw upon being accessed from different threads.

Like `produce-blocking`, but calls `pre` and `post` in the context
of the thread.
The value returned by `pre` is passed to `f` and `post`.
`pre` is called before the loop, `post` after it exhausts.

Useful for non thread safe objects which throw upon being accessed from
different threads.
sourceraw docstring

split*clj

(split* f ch m)

Takes a channel, function f :: v -> k and a map of keys to channels k -> ch, routing the values v from the input channel to the channel such that (f v) -> ch.

(get m (f v)) must be non-nil for every v!

Takes a channel, function f :: v -> k and a map of keys to channels k -> ch,
routing the values v from the input channel to the channel such that
(f v) -> ch.

(get m (f v)) must be non-nil for every v! 
sourceraw docstring

split-maybeclj

(split-maybe f ch m)

Takes a channel, function f :: v -> k and a map of keys to channels k -> ch, routing the values v from the input channel to the channel such that (f v) -> ch.

If (f v) is not in m, the value is dropped

Takes a channel, function f :: v -> k and a map of keys to channels k -> ch,
routing the values v from the input channel to the channel such that
(f v) -> ch.

If (f v) is not in m, the value is dropped
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close