(blocking-future & body)
Dispatches body
on a separate thread and returns a future that will eventually contain the result. body
may block.
See future-call
Dispatches `body` on a separate thread and returns a future that will eventually contain the result. `body` may block. See `future-call`
(blocking-future-call task)
Dispatches task
on a separate thread and returns a future that will eventually contain the result of task
.
task
may block.
Dispatches `task` on a separate thread and returns a future that will eventually contain the result of `task`. `task` may block.
(const-future v)
Creates a new future and immediately completes it successfully with v
Creates a new future and immediately completes it successfully with `v`
(failed-future e)
pred?
needs to return a Future that yields a boolean. Returns a Future which yields a future containing all Futures which match pred?
`pred?` needs to return a Future that yields a boolean. Returns a Future which yields a future containing all Futures which match `pred?`
(from-try f)
Creates a future from a function f
. See try*
Creates a future from a function `f`. See `try*`
(future & body)
Dispatches body
on a separate thread and returns a future that will eventually contain the result. body
must be free of side effects.
See future-call
Dispatches `body` on a separate thread and returns a future that will eventually contain the result. `body` must be free of side effects. See `future-call`
(future-call task)
Dispatches task
on a separate thread and returns a future that will eventually contain the result of task
.
task
must be free of side effects.
Dispatches `task` on a separate thread and returns a future that will eventually contain the result of `task`. `task` must be free of side effects.
A simple, 'empty' future instance that can be used as a monad context to combinators that require one.
A simple, 'empty' future instance that can be used as a monad context to combinators that require one.
f
needs to return a future. Maps f
over vs
and sequences all resulting futures. See sequence
`f` needs to return a future. Maps `f` over `vs` and sequences all resulting futures. See `sequence`
(promise)
Creates a new, unresolved promise.
Creates a new, unresolved promise.
(reduce f seed ms)
Returns a Future containing a list of the results yielded by all futures in ms
further reduced using f
and seed
. See sequence
and map
Returns a Future containing a list of the results yielded by all futures in `ms` further reduced using `f` and `seed`. See `sequence` and `map`
Given a list of futures, returns a future that will eventually contain a list of the results yielded by all futures. If any future fails, returns a Future representing that failure
Given a list of futures, returns a future that will eventually contain a list of the results yielded by all futures. If any future fails, returns a Future representing that failure
(try* f)
Wraps f
in a try/catch. Returns the result of f
in a Success
type if successful. Returns a Failure
containing the exception otherwise.
Wraps `f` in a try/catch. Returns the result of `f` in a `Success` type if successful. Returns a `Failure` containing the exception otherwise.
(try-future & body)
Wraps body in a try/catch. If an exception is thrown, returns a Future which yields a Failure containg the exception.
Wraps body in a try/catch. If an exception is thrown, returns a Future which yields a Failure containg the exception.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close