(latched-future latch & body)
Same as clojure.core/future
, but 'linked' with a
CountDownLatch which is .countDown()
after <body> executes.
Same as `clojure.core/future`, but 'linked' with a CountDownLatch which is `.countDown()` after <body> executes.
(pslurp source
&
{:keys [encoding threads raw-bytes?]
:or {encoding "UTF-8" threads CPUS}})
A parallel version of clojure.core/slurp
intended to be used
against local files. Therefore, the only concrete types allowed
as <source> are String, File & URI/URL (only of 'file' protocol/scheme).
<opts> can include :encoding (default 'UTF-8'), :raw-bytes? (default false),
and/or :threads, which controls how the contents of <source> will be chunked,
and ultimately the level of parallelism. Defaults to .availableProcessors()
.
If <threads> = 1 and <raw-bytes?> = false, delegates to clojure.core/slurp
.
LIMITATION: works on files up to 2GB.
A parallel version of `clojure.core/slurp` intended to be used against local files. Therefore, the only concrete types allowed as <source> are String, File & URI/URL (only of 'file' protocol/scheme). <opts> can include :encoding (default 'UTF-8'), :raw-bytes? (default false), and/or :threads, which controls how the contents of <source> will be chunked, and ultimately the level of parallelism. Defaults to `.availableProcessors()`. If <threads> = 1 and <raw-bytes?> = false, delegates to `clojure.core/slurp`. LIMITATION: works on files up to 2GB.
(pslurp-big source)
Similar to pslurp
, but intended to be used with files larger than 2GB.
Returns a seq (per pmap
) of N byte-arrays.
Similar to `pslurp`, but intended to be used with files larger than 2GB. Returns a seq (per `pmap`) of N byte-arrays.
(pspit dest
content
&
{:keys [threads encoding] :or {encoding "UTF-8" threads CPUS}})
(pspit-big dest contents & {:keys [encoding] :or {encoding "UTF-8"}})
Similar to pspit
, but intended to be used against multiple <contents>,
whose concatenation wouldn't fit in a single String or byte-array (larger than 2GB).
Similar to `pspit`, but intended to be used against multiple <contents>, whose concatenation wouldn't fit in a single String or byte-array (larger than 2GB).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close