Skip to main content

Async

  • <!

    takes a val from port. Must be called inside a (go ...) block. Will return nil if closed. Will park if nothing is avai...

  • <!!

    takes a val from port. Will return nil if closed. Will block if nothing is available. Not intended for use in direct...

  • >!

    puts a val into port. nil values are not allowed. Must be called inside a (go ...) block. Will park if no buffer space...

  • >!!

    puts a val into port. nil values are not allowed. Will block if no buffer space is available. Returns true unless port...

  • admix

    Adds ch as an input to the mix

  • alt!

    Makes a single choice between one of several channel operations, as if by alts!, returning the value of the result exp...

  • alt!!

    Like alt!, except as if by alts!!, will block until completed, and not intended for use in (go ...) blocks.

  • alts!

    Completes at most one of several channel operations. Must be called inside a (go ...) block. ports is a vector of chan...

  • alts!!

    Like alts!, except takes will be made as if by <!!, and puts will be made as if by >!!, will block until completed. ...

  • buffer

    Returns a fixed buffer of size n. When full, puts will block/park.

  • chan

    Creates a channel with an optional buffer, an optional transducer (like (map f), (filter p) etc or a composition there...

  • close!

    Closes a channel. The channel will no longer accept any puts (they will be ignored). Data in the channel remains avail...

  • do-alts

    returns derefable [val port] if immediate, nil if enqueued

  • dropping-buffer

    Returns a buffer of size n. When full, puts will complete but val will be dropped (no transfer).

  • go

    Asynchronously executes the body, returning immediately to the calling thread. Additionally, any visible calls to <!, ...

  • go-loop

    Like (go (loop ...))

  • into

    Returns a channel containing the single (collection) result of the items taken from the channel conjoined to the suppl...

  • map

    Takes a function and a collection of source channels, and returns a channel which contains the values produced by appl...

  • merge

    Takes a collection of source channels and returns a channel which contains all values taken from them. The returned ch...

  • mix

    Creates and returns a mix of one or more input channels which will be put on the supplied out channel. Input sources c...

  • mult

    Creates and returns a mult(iple) of the supplied channel. Channels containing copies of the channel can be created wit...

  • offer!

    Puts a val into port if it's possible to do so immediately. nil values are not allowed. Never blocks. Returns true if...

  • onto-chan!

    Puts the contents of coll into the supplied channel. By default the channel will be closed after the items are copied...

  • onto-chan!!

    Like onto-chan! for use when accessing coll might block, e.g. a lazy seq of blocking operations

  • pipe

    Takes elements from the from channel and supplies them to the to channel. By default, the to channel will be closed wh...

  • pipeline

    Takes elements from the from channel and supplies them to the to channel, subject to the transducer xf, with paralleli...

  • pipeline-async

    Takes elements from the from channel and supplies them to the to channel, subject to the async function af, with paral...

  • pipeline-blocking

    Like pipeline, for blocking operations.

  • poll!

    Takes a val from port if it's possible to do so immediately. Never blocks. Returns value if successful, nil otherwise...

  • promise-chan

    Creates a promise channel with an optional transducer, and an optional exception-handler. A promise channel can take e...

  • pub

    Creates and returns a pub(lication) of the supplied channel, partitioned into topics by the topic-fn. topic-fn will be...

  • put!

    Asynchronously puts a val into port, calling fn1 (if supplied) when complete, passing false iff port is already close...

  • reduce

    f should be a function of 2 arguments. Returns a channel containing the single result of applying f to init and the fi...

  • sliding-buffer

    Returns a buffer of size n. When full, puts will complete, and be buffered, but oldest elements in buffer will be drop...

  • solo-mode

    Sets the solo mode of the mix. mode must be one of :mute or :pause

  • split

    Takes a predicate and a source channel and returns a vector of two channels, the first of which will contain the value...

  • sub

    Subscribes a channel to a topic of a pub. By default the channel will be closed when the source closes, but can be ...

  • take

    Returns a channel that will return, at most, n items from ch. After n items have been returned, or ch has been closed...

  • take!

    Asynchronously takes a val from port, passing to fn1. Will pass nil if closed. If on-caller? (default true) is true, ...

  • tap

    Copies the mult source onto the supplied channel. By default the channel will be closed when the source closes, but...

  • thread

    Executes the body in another thread, returning immediately to the calling thread. Returns a channel which will receive...

  • thread-call

    Executes f in another thread, returning immediately to the calling thread. Returns a channel which will receive the re...

  • timeout

    Returns a channel that will close after msecs

  • to-chan!

    Creates and returns a channel which contains the contents of coll, closing when exhausted. If accessing coll might ...

  • to-chan!!

    Like to-chan! for use when accessing coll might block, e.g. a lazy seq of blocking operations

  • toggle

    Atomically sets the state(s) of one or more channels in a mix. The state map is a map of channels -> channel-state-map...

  • transduce

    async/reduces a channel with a transformation (xform f). Returns a channel containing the result. ch must close befor...

  • unblocking-buffer?

    Returns true if a channel created with buff will never block. That is to say, puts into this buffer will never cause ...

  • unmix

    Removes ch as an input to the mix

  • unmix-all

    removes all inputs from the mix

  • unsub

    Unsubscribes a channel from a topic of a pub

  • unsub-all

    Unsubscribes all channels from a pub, or a topic of a pub

  • untap

    Disconnects a target channel from a mult

  • untap-all

    Disconnects all target channels from a mult