Liking cljdoc? Tell your friends :D

tapestry.core

Core namespace of Tapestry

Core namespace of Tapestry
raw docstring

alive?clj

(alive? fiber)

Return whether the provided fiber is alive

Return whether the provided `fiber` is alive
raw docstring

asynclyclj

(asyncly f s)
(asyncly n f s)

Executes mapping function f over the provided stream s.

Returns a new stream in which items will be emitted in any order after f finishes.

Runs each item in a loom fiber.

Optionally takes a number n which will be the maximum parallelism.

Executes mapping function `f` over the provided stream `s`.

Returns a new stream in which items will be emitted in any order after `f` finishes.

Runs each item in a loom fiber.

Optionally takes a number `n` which will be the maximum parallelism.
raw docstring

fibercljmacro

(fiber & body)

Execute body on a loom fiber, returning a deferred that will resolve when the fiber completes.

Execute body on a loom fiber, returning a deferred that will resolve when the fiber completes.
raw docstring

fiber-loopcljmacro

(fiber-loop bindings & body)

Execute a body inside a loop.

Execute a body inside a loop.
raw docstring

interrupt!clj

(interrupt! fiber)

Interrupt the provided fiber, causing a java.lang.InterruptedException to be thrown in the fiber

Return the provided fiberfor chaining

Interrupt the provided fiber, causing a `java.lang.InterruptedException` to be
thrown in the `fiber`

Return the provided `fiber`for chaining
raw docstring

parallellyclj

(parallelly f s)
(parallelly n f s)

Maps f over the stream or seq s with up to n items occuring in parallel.

If n is not specified, will use unbounded parallelism (or the max parallism set via the with-max-parallelism macro).

Maps `f` over the stream or seq `s` with up to `n` items occuring in parallel.

If `n` is not specified, will use unbounded parallelism (or the max parallism set via the
`with-max-parallelism` macro).
raw docstring

periodicallyclj

(periodically period f)
(periodically period initial-delay f)

Behaves similarly to manifold.stream/periodically but relies on a loom fiber for time keeping. If no initial delay is specified runs immediately.

Also automatically coerces durations into millisecond values.

Behaves similarly to `manifold.stream/periodically` but relies on a loom
fiber for time keeping. If no initial delay is specified runs immediately.

Also automatically coerces durations into millisecond values.
raw docstring

pforcljmacro

(pfor seq-exprs body-expr)

Macro which behaves identically to clojure.core.for but runs the body in parallell using fibers.

Note that bindings in :let and :when will not be evaluated in parallel.

Will force evaluation of the sequence (ie. this is no longer lazy).

Macro which behaves identically to `clojure.core.for` but runs the body in parallell using
fibers.

Note that bindings in `:let` and `:when` will not be evaluated in parallel.

Will force evaluation of the sequence (ie. this is no longer lazy).
raw docstring

sendclj

(send a f & args)

A version of send that uses a loom fiber for the execution of the function f.

See clojure.core/send for details

A version of `send` that uses a loom fiber for the execution of the function `f`.

See `clojure.core/send` for details
raw docstring

seq->streamcljmacro

(seq->stream expr)

Macro which runs an expression that returns a (presumably lazy) sequence and runs it in a fiber, returning a source stream of the results

Macro which runs an expression that returns a (presumably lazy) sequence and runs it in a fiber,
returning a source stream of the results
raw docstring

set-stream-error-handler!clj

(set-stream-error-handler! f)

Set a function to be called when an error occurs in a tapestry returned stream.

By default will println. Set to nil to do nothing

Calls (f err msg).

Set a function to be called when an error occurs in a tapestry
returned stream.

By default will println. Set to `nil` to do nothing

Calls `(f err msg)`.
raw docstring

timeout!clj

(timeout! fiber timeout)
(timeout! fiber timeout default)

Set the provided timeout on the provided fiber, causing a java.util.concurrent.TimeoutException to be thrown on the deferred (or default to be returrned) and the fiber to be interrupted.

Return the provied fiber for chaining.

Accepts either a number in millis or a duration.

Set the provided `timeout` on the provided `fiber`, causing a
`java.util.concurrent.TimeoutException` to be thrown on the deferred (or `default` to be returrned)
and the `fiber` to be interrupted.

Return the provied `fiber` for chaining.

Accepts either a number in millis or a duration.
raw docstring

with-max-parallelismcljmacro

(with-max-parallelism n & body)

Executes the provided body with an executor that ensures that at most n fibers will run in parallel.

Executes the provided body with an executor that ensures that at most `n` fibers
will run in parallel.
raw docstring

with-timeoutcljmacro

(with-timeout timeout & body)

Executes all newly spawned fibers with the provided timeout.

Accepts either a number (used as millis) or java.lang.Duration for timeout.

Executes all newly spawned fibers with the provided `timeout`.

Accepts either a number (used as `millis`) or `java.lang.Duration` for
`timeout`.
raw docstring

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

× close