Skip to content

clojure.core/future

View this page on ClojureDocs

Type: macro Added: Clojure 1.1 Examples: 6 Runnable: 1
([& body])

Takes a body of expressions and yields a future object that will invoke the body in another thread, and will cache the result and return it on all subsequent calls to deref/@. If the computation has not yet finished, calls to deref/@ will block, unless the variant of deref with timeout is used. See also - realized?.

Examples

by gstamp on . May have evaluation errors.
by OnesimusUnbound on
by mattvvhat on . May have evaluation errors.
by tomgeorge on . May have evaluation errors.
by loeschzwerg on . May have evaluation errors.
by huahaiy on . May have evaluation errors.

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.