Liking cljdoc? Tell your friends :D

net.core.async

Small extensions and improvements on top of core.async

Some bits shamelessly stolen from @mpenet's jet, See https://github.com/mpenet/jet for original

Small extensions and improvements on top of core.async

Some bits shamelessly stolen from @mpenet's jet,
See https://github.com/mpenet/jet for original
raw docstring

backpressure-handling-fnclj

(backpressure-handling-fn status backpressure! close!)
source

close-drainingclj

(close-draining chan f)
source

drainclj

(drain chan)
(drain chan f)
source

put!clj

(put! ch msg backpressure!)
(put! ch msg backpressure! close!)

Takes a ch, a msg, a single arg function that when passed true enables backpressure and when passed false disables it, and a no-arg function which, when invoked, closes the upstream source.

Takes a `ch`, a `msg`, a single arg function that when passed
`true` enables backpressure and when passed `false` disables it,
and a no-arg function which, when invoked, closes the upstream
source.
sourceraw docstring

timeout-pipeclj

(timeout-pipe tmval from to)
(timeout-pipe max-wait from to close?)

A variation on clojure.core.async/pipe which will close if no input is submitted within a given interval.

A variation on `clojure.core.async/pipe` which will
close if no input is submitted within a given interval.
sourceraw docstring

validating-chanclj

(validating-chan spec buf-or-n)
(validating-chan spec buf-or-n error-value)
(validating-chan spec buf-or-n error-value always-assert?)

A chan which ensures that values produced to it match a given spec. Failing to match the spec will produce error-value on the channel.

When error-value is a function, call it with no args to produce the error value, or produce error-value itself.

When always-assert? is provided, force asserts, regardless of the value of *clojure.core/compile-asserts*, otherwise, and by default honor the value.

The 1-arity version produces nil on the chan in case of errors.

A chan which ensures that values produced
to it match a given spec. Failing to match the spec
will produce `error-value` on the channel.

When `error-value` is a function, call it with no
args to produce the error value, or produce
`error-value` itself.

When `always-assert?` is provided, force asserts,
regardless of the value of `*clojure.core/compile-asserts*`,
otherwise, and by default honor the value.

The 1-arity version produces nil on the chan in case of errors.
sourceraw docstring

validating-fnclj

(validating-fn spec always-assert?)

Yield correct predicate based on assertion preference.

Yield correct predicate based on assertion preference.
sourceraw docstring

validating-promise-chanclj

(validating-promise-chan spec)
(validating-promise-chan spec error-value)
(validating-promise-chan spec error-value always-assert?)

A promise chan which ensures that values produced to it match a given spec. Failing to match the spec will produce error-value on the channel.

When error-value is a function, call it with no args to produce the error value, or produce error-value itself.

When always-assert? is provided, force asserts, regardless of the value of *clojure.core/compile-asserts*, otherwise, and by default honor the value.

The 1-arity version produces nil on the chan in case of errors.

A promise chan which ensures that values produced
to it match a given spec. Failing to match the spec
will produce `error-value` on the channel.

When `error-value` is a function, call it with no
args to produce the error value, or produce
`error-value` itself.

When `always-assert?` is provided, force asserts,
regardless of the value of `*clojure.core/compile-asserts*`,
otherwise, and by default honor the value.

The 1-arity version produces nil on the chan in case of errors.
sourceraw docstring

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

× close