clojure.core.async
<
>
A
Adds ch as an input to the mix
function([mix ch])
- protocol-method
([m ch])
Makes a single choice between one of several channel operations, as if by alts!, returning the value of the result exp...
macro([& clauses])
Like alt!, except as if by alts!!, will block until completed, and not intended for use in (go ...) blocks.
macro([& clauses])
Completes at most one of several channel operations. Must be called inside a (go ...) block. ports is a vector of chan...
function([ports & {:as opts}])
Like alts!, except takes will be made as if by <!!, and puts will be made as if by >!!, will block until completed. ...
function([ports & opts])
B
Returns a fixed buffer of size n. When full, puts will block/park.
function([n])
C
Creates a channel with an optional buffer, an optional transducer (like (map f), (filter p) etc or a composition there...
function([] [buf-or-n] [buf-or-n xform] [buf-or-n xform ex-handler])
Closes a channel. The channel will no longer accept any puts (they will be ignored). Data in the channel remains avail...
function([chan])
D
- macro
([op doc arglist & body])
- function
([alts clauses])
returns derefable [val port] if immediate, nil if enqueued
function([fret ports opts])
Returns a buffer of size n. When full, puts will complete but val will be dropped (no transfer).
function([n])
F
- function
([f] [f blockable])
G
I
Returns a channel containing the single (collection) result of the items taken from the channel conjoined to the suppl...
function([coll ch])
- function
([state cont-block ports & {:as opts}])
M
- value
- value
- value
Takes a function and a collection of source channels, and returns a channel which contains the values produced by appl...
function([f chs] [f chs buf-or-n])
Takes a collection of source channels and returns a channel which contains all values taken from them. The returned ch...
function([chs] [chs buf-or-n])
Creates and returns a mix of one or more input channels which will be put on the supplied out channel. Input sources c...
function([out])
Creates and returns a mult(iple) of the supplied channel. Channels containing copies of the channel can be created wit...
function([ch])
- protocol-method
([_])
O
Puts a val into port if it's possible to do so immediately. nil values are not allowed. Never blocks. Returns true if...
function([port val])
Puts the contents of coll into the supplied channel. By default the channel will be closed after the items are copied...
function([ch coll] [ch coll close?])
Like onto-chan! for use when accessing coll might block, e.g. a lazy seq of blocking operations
function([ch coll] [ch coll close?])
P
- value
Takes elements from the from channel and supplies them to the to channel. By default, the to channel will be closed wh...
function([from to] [from to close?])
Takes elements from the from channel and supplies them to the to channel, subject to the transducer xf, with paralleli...
function([n to xf from] [n to xf from close?] [n to xf from close? ex-handler])
Takes elements from the from channel and supplies them to the to channel, subject to the async function af, with paral...
function([n to af from] [n to af from close?])
Like pipeline, for blocking operations.
function([n to xf from] [n to xf from close?] [n to xf from close? ex-handler])
Takes a val from port if it's possible to do so immediately. Never blocks. Returns value if successful, nil otherwise...
function([port])
Creates a promise channel with an optional transducer, and an optional exception-handler. A promise channel can take e...
function([] [xform] [xform ex-handler])
Creates and returns a pub(lication) of the supplied channel, partitioned into topics by the topic-fn. topic-fn will be...
function([ch topic-fn] [ch topic-fn buf-fn])
Asynchronously puts a val into port, calling fn1 (if supplied) when complete, passing false iff port is already close...
function([port val] [port val fn1] [port val fn1 on-caller?])
R
f should be a function of 2 arguments. Returns a channel containing the single result of applying f to init and the fi...
function([f init ch])
S
Returns a buffer of size n. When full, puts will complete, and be buffered, but oldest elements in buffer will be drop...
function([n])
Sets the solo mode of the mix. mode must be one of :mute or :pause
function([mix mode])
- protocol-method
([m mode])
Takes a predicate and a source channel and returns a vector of two channels, the first of which will contain the value...
function([p ch] [p ch t-buf-or-n f-buf-or-n])
Subscribes a channel to a topic of a pub. By default the channel will be closed when the source closes, but can be ...
function([p topic ch] [p topic ch close?])
- protocol-method
([p v ch close?])
T
Returns a channel that will return, at most, n items from ch. After n items have been returned, or ch has been closed...
function([n ch] [n ch buf-or-n])
Asynchronously takes a val from port, passing to fn1. Will pass nil if closed. If on-caller? (default true) is true, ...
function([port fn1] [port fn1 on-caller?])
Copies the mult source onto the supplied channel. By default the channel will be closed when the source closes, but...
function([mult ch] [mult ch close?])
- protocol-method
([m ch close?])
Executes the body in another thread, returning immediately to the calling thread. Returns a channel which will receive...
macro([& body])
Executes f in another thread, returning immediately to the calling thread. Returns a channel which will receive the re...
function([f])
Returns a channel that will close after msecs
function([msecs])
Creates and returns a channel which contains the contents of coll, closing when exhausted. If accessing coll might ...
function([coll])
Like to-chan! for use when accessing coll might block, e.g. a lazy seq of blocking operations
function([coll])
Atomically sets the state(s) of one or more channels in a mix. The state map is a map of channels -> channel-state-map...
function([mix state-map])
- protocol-method
([m state-map])
async/reduces a channel with a transformation (xform f). Returns a channel containing the result. ch must close befor...
function([xform f init ch])
U
Returns true if a channel created with buff will never block. That is to say, puts into this buffer will never cause ...
function([buff])
Removes ch as an input to the mix
function([mix ch])
- protocol-method
([m ch])
removes all inputs from the mix
function([mix])
- protocol-method
([m])
Unsubscribes a channel from a topic of a pub
function([p topic ch])
- protocol-method
([p v ch])
Unsubscribes all channels from a pub, or a topic of a pub
function([p] [p topic])
- protocol-method
([p] [p v])
Disconnects a target channel from a mult
function([mult ch])
- protocol-method
([m ch])
Disconnects all target channels from a mult
function([mult])
- protocol-method
([m])