Liking cljdoc? Tell your friends :D

futurama.core


!<!cljmacro

(!<! v)

An improved macro version of <!, which also rethrows exceptions returned over the channel. Must be called INSIDE a (go ...) or (async ...) block.

  • Will return nil if closed.
  • Will park if nothing is available.
  • Will throw if an Exception is taken from port.
  • Will return the raw value if it is not a ReadPort
  • Will fully read through any async result returned
An improved macro version of <!, which also rethrows exceptions returned over the channel.
Must be called INSIDE a (go ...) or (async ...) block.
- Will return nil if closed.
- Will park if nothing is available.
- Will throw if an Exception is taken from port.
- Will return the raw value if it is not a ReadPort
- Will fully read through any async result returned
sourceraw docstring

!<!!cljmacro

(!<!! v)

An improved macro version of <!!, which also rethrows exceptions returned over the channel. Must be called OUTSIDE a (go ...) or (async ...) block.

  • Will return nil if closed.
  • Will block if nothing is available.
  • Will throw if a Exception is taken from port.
  • Will return the raw value if it is not a ReadPort
  • Will fully read through any async result returned
An improved macro version of <!!, which also rethrows exceptions returned over the channel.
Must be called OUTSIDE a (go ...) or (async ...) block.
- Will return nil if closed.
- Will block if nothing is available.
- Will throw if a Exception is taken from port.
- Will return the raw value if it is not a ReadPort
- Will fully read through any async result returned
sourceraw docstring

!<!*cljmacro

(!<!* coll)

Like !<! but works with collections of async values

Like !<! but works with collections of async values
sourceraw docstring

*async-factory*clj

source

*thread-pool*clj

source

->async-readerclj

(->async-reader x)

Creates an AsyncReader to read anything via take!

Creates an AsyncReader to read anything via `take!`
sourceraw docstring

<!cljmacro

(<! v)

An improved macro version of <!, which also rethrows exceptions returned over the channel. Must be called INSIDE a (go ...) or (async ...) block.

  • Will return nil if closed.
  • Will park if nothing is available.
  • Will throw if an Exception is taken from port.
  • Will return the raw value if it is not a ReadPort
An improved macro version of <!, which also rethrows exceptions returned over the channel.
Must be called INSIDE a (go ...) or (async ...) block.
- Will return nil if closed.
- Will park if nothing is available.
- Will throw if an Exception is taken from port.
- Will return the raw value if it is not a ReadPort
sourceraw docstring

<!!cljmacro

(<!! v)

An improved macro version of <!!, which also rethrows exceptions returned over the channel. Must be called OUTSIDE a (go ...) or (async ...) block.

  • Will return nil if closed.
  • Will block if nothing is available.
  • Will throw if a Exception is taken from port.
  • Will return the raw value if it is not a ReadPort
An improved macro version of <!!, which also rethrows exceptions returned over the channel.
Must be called OUTSIDE a (go ...) or (async ...) block.
- Will return nil if closed.
- Will block if nothing is available.
- Will throw if a Exception is taken from port.
- Will return the raw value if it is not a ReadPort
sourceraw docstring

<!*cljmacro

(<!* coll)

Like <! but works with collections of async values

Like <! but works with collections of async values
sourceraw docstring

asynccljmacro

(async & body)

Asynchronously executes the body, returning immediately to the calling thread. Additionally, any visible calls to !<!, <!, >! and alt!/alts! channel operations within the body will block (if necessary) by 'parking' the calling thread rather than tying up an OS thread. Upon completion of the operation, the body will be resumed.

async blocks should not (either directly or indirectly) perform operations that may block indefinitely. Doing so risks depleting the fixed pool of go block threads, causing all go block processing to stop. This includes core.async blocking ops (those ending in !!) and other blocking IO.

Returns an instance of the default async-factory which will receive the result of the body when completed; the pool used can be specified via *thread-pool* binding.

Asynchronously executes the body, returning immediately to the
calling thread. Additionally, any visible calls to !<!, <!, >! and alt!/alts!
channel operations within the body will block (if necessary) by
'parking' the calling thread rather than tying up an OS thread.
Upon completion of the operation, the body will be resumed.

async blocks should not (either directly or indirectly) perform operations
that may block indefinitely. Doing so risks depleting the fixed pool of
go block threads, causing all go block processing to stop. This includes
core.async blocking ops (those ending in !!) and other blocking IO.

Returns an instance of the default *async-factory* which will receive the result of the body when
completed; the pool used can be specified via `*thread-pool*` binding.
sourceraw docstring

async!cljmacro

(async! port & body)

Asynchronously executes the body, returning port immediately to the calling thread. Additionally, any visible calls to !<!, <!, >! and alt!/alts! channel operations within the body will block (if necessary) by 'parking' the calling thread rather than tying up an OS thread. Upon completion of the operation, the body will be resumed.

The success or failure output will be put! in port.

async blocks should not (either directly or indirectly) perform operations that may block indefinitely. Doing so risks depleting the fixed pool of go block threads, causing all go block processing to stop. This includes core.async blocking ops (those ending in !!) and other blocking IO.

Returns the provided port which will receive the result of the body when completed; the pool used can be specified via *thread-pool* binding.

Asynchronously executes the body, returning `port` immediately to the
calling thread. Additionally, any visible calls to !<!, <!, >! and alt!/alts!
channel operations within the body will block (if necessary) by
'parking' the calling thread rather than tying up an OS thread.
Upon completion of the operation, the body will be resumed.

The success or failure output will be put! in `port`.

async blocks should not (either directly or indirectly) perform operations
that may block indefinitely. Doing so risks depleting the fixed pool of
go block threads, causing all go block processing to stop. This includes
core.async blocking ops (those ending in !!) and other blocking IO.

Returns the provided port which will receive the result of the body when
completed; the pool used can be specified via `*thread-pool*` binding.
sourceraw docstring

async->cljmacro

(async-> v & call-seq)

Threads the expr through the forms which can return async result. Inserts v as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc.

Threads the expr through the forms which can return async result.
Inserts v as the second item in the first form, making a list of it
if it is not a list already. If there are more forms, inserts the
first form as the second item in second form, etc.
sourceraw docstring

async->>cljmacro

(async->> v & call-seq)

Threads the expr through the forms which can return async result. Inserts x as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the last item in second form, etc.

Threads the expr through the forms which can return async result.
Inserts x as the last item in the first form, making a list of it
if it is not a list already. If there are more forms, inserts the
first form as the last item in second form, etc.
sourceraw docstring

async-cancel!clj

(async-cancel! item)

Cancels the async item.

Cancels the async item.
sourceraw docstring

async-cancellable?clj

(async-cancellable? v)

Determines if v satisfies? AsyncCancellable

Determines if v satisfies? `AsyncCancellable`
sourceraw docstring

async-cancelled?clj

(async-cancelled?)
(async-cancelled? item)

Checks if the current executing async item or one of its parents or provided item has been cancelled. Also checks if the thread has been interrupted and restores the interrupt status.

Checks if the current executing async item or one of its parents or provided item has been cancelled.
Also checks if the thread has been interrupted and restores the interrupt status.
sourceraw docstring

async-channelcljmacro

(async-channel & body)

Asynchronously executes the body, returning immediately to the calling thread. Additionally, any visible calls to !<!, <!, >! and alt!/alts! channel operations within the body will block (if necessary) by 'parking' the calling thread rather than tying up an OS thread. Upon completion of the operation, the body will be resumed.

async blocks should not (either directly or indirectly) perform operations that may block indefinitely. Doing so risks depleting the fixed pool of go block threads, causing all go block processing to stop. This includes core.async blocking ops (those ending in !!) and other blocking IO.

Returns a channel which will receive the result of the body when completed; the pool used can be specified via *thread-pool* binding.

Asynchronously executes the body, returning immediately to the
calling thread. Additionally, any visible calls to !<!, <!, >! and alt!/alts!
channel operations within the body will block (if necessary) by
'parking' the calling thread rather than tying up an OS thread.
Upon completion of the operation, the body will be resumed.

async blocks should not (either directly or indirectly) perform operations
that may block indefinitely. Doing so risks depleting the fixed pool of
go block threads, causing all go block processing to stop. This includes
core.async blocking ops (those ending in !!) and other blocking IO.

Returns a channel which will receive the result of the body when
completed; the pool used can be specified via `*thread-pool*` binding.
sourceraw docstring

async-channel-factoryclj

(async-channel-factory)

Creates a core async channel of size 1

Creates a core async channel of size 1
sourceraw docstring

async-completed?clj

(async-completed? x)

Checks if the provided AsyncCompletableReader instance is completed?

Checks if the provided `AsyncCompletableReader` instance is completed?
sourceraw docstring

async-deferredcljmacro

(async-deferred & body)

Asynchronously executes the body, returning immediately to the calling thread. Additionally, any visible calls to !<!, <!, >! and alt!/alts! channel operations within the body will block (if necessary) by 'parking' the calling thread rather than tying up an OS thread. Upon completion of the operation, the body will be resumed.

async blocks should not (either directly or indirectly) perform operations that may block indefinitely. Doing so risks depleting the fixed pool of go block threads, causing all go block processing to stop. This includes core.async blocking ops (those ending in !!) and other blocking IO.

Returns a Deferred which will receive the result of the body when completed; the pool used can be specified via *thread-pool* binding.

Asynchronously executes the body, returning immediately to the
calling thread. Additionally, any visible calls to !<!, <!, >! and alt!/alts!
channel operations within the body will block (if necessary) by
'parking' the calling thread rather than tying up an OS thread.
Upon completion of the operation, the body will be resumed.

async blocks should not (either directly or indirectly) perform operations
that may block indefinitely. Doing so risks depleting the fixed pool of
go block threads, causing all go block processing to stop. This includes
core.async blocking ops (those ending in !!) and other blocking IO.

Returns a Deferred which will receive the result of the body when
completed; the pool used can be specified via `*thread-pool*` binding.
sourceraw docstring

async-deferred-factoryclj

(async-deferred-factory)

Creates a new Manifold Deferred

Creates a new Manifold Deferred
sourceraw docstring

async-every?clj

(async-every? pred coll)

Returns true if (pred x) is logical true for every x in coll, else false.

Returns true if (pred x) is logical true for every x in coll, else false.
sourceraw docstring

async-forcljmacro

(async-for bindings & body)

works like a for macro, but supports core.async operations. bindings are initially bound and collected, then the data is iterated over using a loop and the output collected; note that only the body of the for can contain <! and !<! calls. This is implicitly wrapped in an async block.

works like a for macro, but supports core.async operations.
bindings are initially bound and collected, then the data is iterated
over using a loop and the output collected; note that only the body of
the for can contain `<!` and `!<!` calls. This is implicitly wrapped in
an `async` block.
sourceraw docstring

async-futurecljmacro

(async-future & body)

Asynchronously executes the body, returning immediately to the calling thread. Additionally, any visible calls to !<!, <!, >! and alt!/alts! channel operations within the body will block (if necessary) by 'parking' the calling thread rather than tying up an OS thread. Upon completion of the operation, the body will be resumed.

async blocks should not (either directly or indirectly) perform operations that may block indefinitely. Doing so risks depleting the fixed pool of go block threads, causing all go block processing to stop. This includes core.async blocking ops (those ending in !!) and other blocking IO.

Returns a CompletableFuture which will receive the result of the body when completed; the pool used can be specified via *thread-pool* binding.

Asynchronously executes the body, returning immediately to the
calling thread. Additionally, any visible calls to !<!, <!, >! and alt!/alts!
channel operations within the body will block (if necessary) by
'parking' the calling thread rather than tying up an OS thread.
Upon completion of the operation, the body will be resumed.

async blocks should not (either directly or indirectly) perform operations
that may block indefinitely. Doing so risks depleting the fixed pool of
go block threads, causing all go block processing to stop. This includes
core.async blocking ops (those ending in !!) and other blocking IO.

Returns a CompletableFuture which will receive the result of the body when
completed; the pool used can be specified via `*thread-pool*` binding.
sourceraw docstring

async-future-factoryclj

(async-future-factory)

Creates a new CompletableFuture

Creates a new CompletableFuture
sourceraw docstring

async-mapclj

(async-map f coll & coll-seq)

Asynchronously returns the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments.

Asynchronously returns the result of applying f to
the set of first items of each coll, followed by applying f to the
set of second items in each coll, until any one of the colls is
exhausted.  Any remaining items in other colls are ignored. Function
f should accept number-of-colls arguments.
sourceraw docstring

async-postwalkclj

(async-postwalk f form)

Performs a depth-first, post-order traversal of form. Calls f on each sub-form, uses f's return value in place of the original. Recognizes all Clojure data structures. Consumes seqs as with doall.

Performs a depth-first, post-order traversal of form.  Calls f on
each sub-form, uses f's return value in place of the original.
Recognizes all Clojure data structures. Consumes seqs as with doall.
sourceraw docstring

async-prewalkclj

(async-prewalk f form)

Like postwalk, but does pre-order traversal.

Like postwalk, but does pre-order traversal.
sourceraw docstring

async-promisecljmacro

(async-promise & body)

Asynchronously executes the body, returning immediately to the calling thread. Additionally, any visible calls to !<!, <!, >! and alt!/alts! channel operations within the body will block (if necessary) by 'parking' the calling thread rather than tying up an OS thread. Upon completion of the operation, the body will be resumed.

async blocks should not (either directly or indirectly) perform operations that may block indefinitely. Doing so risks depleting the fixed pool of go block threads, causing all go block processing to stop. This includes core.async blocking ops (those ending in !!) and other blocking IO.

Returns a clojure Promise which will receive the result of the body when completed; the pool used can be specified via *thread-pool* binding.

Asynchronously executes the body, returning immediately to the
calling thread. Additionally, any visible calls to !<!, <!, >! and alt!/alts!
channel operations within the body will block (if necessary) by
'parking' the calling thread rather than tying up an OS thread.
Upon completion of the operation, the body will be resumed.

async blocks should not (either directly or indirectly) perform operations
that may block indefinitely. Doing so risks depleting the fixed pool of
go block threads, causing all go block processing to stop. This includes
core.async blocking ops (those ending in !!) and other blocking IO.

Returns a clojure Promise which will receive the result of the body when
completed; the pool used can be specified via `*thread-pool*` binding.
sourceraw docstring

async-promise-factoryclj

(async-promise-factory)

Creates a new clojure Promise

Creates a new clojure Promise
sourceraw docstring

async-reduceclj

(async-reduce f coll)
(async-reduce f init coll)

Like core/reduce except, when init is not provided, (f) is used, and async results are read with !<!.

Like core/reduce except, when init is not provided, (f) is used, and async results are read with !<!.
sourceraw docstring

async-someclj

(async-some pred coll)

Concurrently executes (pred x) and returns the first returned logical true value of (pred x) for any x in coll, else nil. One common idiom is to use a set as pred, for example this will return :fred if :fred is in the sequence, otherwise nil: (some #{:fred} coll). Please beware that unlike clojure.core/some this function returns the first asynchronous result that completes and evaluates to logical true, but not necessarily the first one in sequential order.

Concurrently executes (pred x) and returns the first returned
logical true value of (pred x) for any x in coll, else nil.
One common idiom is to use a set as pred, for example
this will return :fred if :fred is in the sequence, otherwise nil:
(some #{:fred} coll). Please beware that unlike `clojure.core/some`
this function returns the first asynchronous result that completes
and evaluates to logical true, but not necessarily the first one
in sequential order.
sourceraw docstring

async-walkclj

(async-walk inner outer form)

Traverses form, an arbitrary data structure. inner and outer are functions. Applies inner to each element of form, building up a data structure of the same type, then applies outer to the result. Recognizes all Clojure data structures. Consumes seqs as with doall.

Traverses form, an arbitrary data structure.  inner and outer are
functions.  Applies inner to each element of form, building up a
data structure of the same type, then applies outer to the result.
Recognizes all Clojure data structures. Consumes seqs as with doall.
sourceraw docstring

async?clj

(async? v)

returns true if v instance satisfies? core.async's ReadPort

returns true if v instance satisfies? core.async's `ReadPort`
sourceraw docstring

ASYNC_CANCELLEDclj

source

completable-futurecljmacro

(completable-future & body)

Asynchronously invokes the body inside a completable future, preserves the current thread binding frame, using by default the ForkJoinPool/commonPool, the pool used can be specified via *thread-pool* binding.

Asynchronously invokes the body inside a completable future, preserves the current thread binding frame,
using by default the `ForkJoinPool/commonPool`, the pool used can be specified via `*thread-pool*` binding.
sourceraw docstring

dispatchclj

(dispatch f)

dispatch the function by submitting it to the *thread-pool*

dispatch the function by submitting it to the `*thread-pool*`
sourceraw docstring

fixed-threadpoolclj

(fixed-threadpool)
(fixed-threadpool n)

Creates a fixed-threadpool, by default uses the number of available processors.

Creates a fixed-threadpool, by default uses the number of available processors.
sourceraw docstring

rethrow-exceptionclj

(rethrow-exception v)

throw v if it is an Exception

throw v if it is an Exception
sourceraw docstring

set-async-factory!clj

(set-async-factory! async-factory-fn)

alters the root binding of async-factory to be equal to async-factory-fn

alters the root binding of *async-factory* to be equal to `async-factory-fn`
sourceraw docstring

unwrap-exceptionclj

(unwrap-exception ex)

unwraps an ExecutionException or CompletionException via ex-cause until the root exception is returned

unwraps an ExecutionException or CompletionException via ex-cause until the root exception is returned
sourceraw docstring

with-async-channel-factorycljmacro

(with-async-channel-factory & body)

temporarily binds async-factory to the speficied async-channel-factory and executes body.

temporarily binds *async-factory* to the speficied `async-channel-factory` and executes body.
sourceraw docstring

with-async-deferred-factorycljmacro

(with-async-deferred-factory & body)

temporarily binds async-factory to the speficied async-deferred-factory and executes body.

temporarily binds *async-factory* to the speficied `async-deferred-factory` and executes body.
sourceraw docstring

with-async-factorycljmacro

(with-async-factory async-factory-fn & body)

temporarily binds async-factory to the speficied async-factory-fn and executes body.

temporarily binds *async-factory* to the speficied async-factory-fn and executes body.
sourceraw docstring

with-async-future-factorycljmacro

(with-async-future-factory & body)

temporarily binds async-factory to the speficied async-future-factory and executes body.

temporarily binds *async-factory* to the speficied `async-future-factory` and executes body.
sourceraw docstring

with-async-promise-factorycljmacro

(with-async-promise-factory & body)

temporarily binds async-factory to the speficied async-promise-factory and executes body.

temporarily binds *async-factory* to the speficied `async-promise-factory` and executes body.
sourceraw docstring

with-poolcljmacro

(with-pool pool & body)

Utility macro which binds thread-pool to the supplied pool and then evaluates the body.

Utility macro which binds *thread-pool* to the supplied pool and then evaluates the `body`.
sourceraw docstring

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

× close