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.
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.
raw 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.
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.
raw docstring

*thread-pool*clj


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 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.
raw docstring

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.
raw docstring

rethrow-exceptionclj

(rethrow-exception v)

throw v if it is an Exception

throw v if it is an Exception
raw 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
raw docstring

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

× close