Liking cljdoc? Tell your friends :D

virtuoso.v3

A set of functions and macros named after their clojure.core counterparts but acting using virtual threads.

A set of functions and macros named after
their clojure.core counterparts but acting
using virtual threads.
raw docstring

binding-conveyor-fnclj

source

deref-by-oneclj

(deref-by-one coll)

Deref all items from a collection lazily one by one.

Deref all items from a collection lazily one by one.
sourceraw docstring

fmapclj

(fmap n f coll)
(fmap n f coll & colls)

Like pmap where each chunk of items is executed in a dedicated virtual executor. The n parameter specifies the chunk size. Each chunk gets completely finished and the executor is closed before proceeding to the next chunk. Return a lazy sequence of futures.

Like `pmap` where each chunk of items is executed in
a dedicated virtual executor. The `n` parameter specifies
the chunk size. Each chunk gets completely finished and
the executor is closed before proceeding to the next chunk.
Return a lazy sequence of futures.
sourceraw docstring

forcljmacro

(for bindings & body)

Like for but performs all body expressions in a virtual executor. The executor gets closed afterwards. Return a lazy sequence of deref'ed items.

Like `for` but performs all body expressions
in a virtual executor. The executor gets closed
afterwards. Return a lazy sequence of deref'ed
items.
sourceraw docstring

futurecljmacro

(future & body)

Run a block of code in a virtual thread. Return a CompletableFuture that gets completed either successfully or exceptionally depending on how the code behaves.

Run a block of code in a virtual thread. Return
a CompletableFuture that gets completed either
successfully or exceptionally depending on how
the code behaves.
sourceraw docstring

future-viacljmacro

(future-via [exe] & body)

Submit a block of code to the given executor service. Return a future.

Submit a block of code to the given executor service.
Return a future.
sourceraw docstring

mapclj

(map f coll)
(map f coll & colls)

Like map but each function is running in a virtual executor producing a future. Return a lazy sequence that derefs futures when iterating.

Like `map` but each function is running in a  virtual executor
producing a future. Return a lazy sequence that derefs futures
when iterating.
sourceraw docstring

pmapclj

(pmap n f coll)
(pmap n f coll & colls)

Like pmap but each chunk of items is run in a dedicated virtual executor. Next chunk is only calculated after the previous one was done. The n parameter specifies the chunk size. Return a lazy sequence of items deref'fed one by one. Based on fmap (see above).

Like `pmap` but each chunk of items is run in a dedicated
virtual executor. Next chunk is only calculated after the
previous one was done. The `n` parameter specifies the
chunk size. Return a lazy sequence of items deref'fed one
by one. Based on `fmap` (see above).
sourceraw docstring

process-by-oneclj

(process-by-one f coll)

A helper function that accepts a sequence of items and applies a function lazily one by one.

A helper function that accepts a sequence of items
and applies a function lazily one by one.
sourceraw docstring

pvaluescljmacro

(pvalues & forms)

Run forms in a dedicated virtual executor and close it afterwards. Return a lazy sequence of deref'ed futures (by one).

Run forms in a dedicated virtual executor and close it
afterwards. Return a lazy sequence of deref'ed futures
(by one).
sourceraw docstring

threadcljmacro

(thread & body)

Run a block of code in a virtual thread. Return a running VirtualThread instance.

Run a block of code in a virtual thread. Return
a running VirtualThread instance.
sourceraw docstring

with-executorcljmacro

(with-executor [bind] & body)

Run a block of code with a new instance of a virtual task executor bound to the bind symbol. The executor gets closed when exiting the macro. Guarantees that all the submitted tasks are completed before the executor is closed.

Run a block of code with a new instance of a virtual task executor
bound to the `bind` symbol. The executor gets closed when exiting
the macro. Guarantees that all the submitted tasks are completed
before the executor is closed.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close