(!<! v)
An improved macro version of <!, which also rethrows exceptions returned over the channel. Must be called INSIDE a (go ...) or (async ...) block.
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.
(!<!! v)
An improved macro version of <!!, which also rethrows exceptions returned over the channel. Must be called OUTSIDE a (go ...) or (async ...) block.
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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close