Liking cljdoc? Tell your friends :D

concurrently.core


Cancellablecljprotocol

cancelclj

(cancel job)
source

Chainablecljprotocol

chainclj

(chain source xf)
(chain source xf ex-handler)

Create a new Chainable which have same type with 'source' and supplies all items from source applying xf on them.

Create a new Chainable which have same type with 'source' and supplies all items from source applying xf on them.
source

cleanup-in-backgroundclj

(cleanup-in-background ch & [finally-fn])

Slurp all data in a channel and abandon them silently.

Slurp all data in a channel and abandon them silently.
sourceraw docstring

concurrent-jobclj

(concurrent-job channel)
(concurrent-job channel id)
source

concurrent-processclj

(concurrent-process parallel-count output-ch f input-ch & [options])

Create a concurrent process backed by core.async/pipeline. f must be a function of two arguments. the first is a value retrieved a pipeline. the second is a options-map supplied to concurrently function. f should be CPU-bounded, should not run blocking actions in f

Create a concurrent process backed by core.async/pipeline.
`f` must be a function of two arguments. the first is a value retrieved a pipeline.
the second is a options-map supplied to `concurrently` function.
`f` should be CPU-bounded, should not run blocking actions in `f`
sourceraw docstring

concurrent-process-blockingclj

(concurrent-process-blocking parallel-count output-ch f input-ch & [options])

Create a concurrent process backed by core.async/pipeline-blocking. f must be a function of two arguments. the first is a value retrieved a pipeline. the second is a options-map supplied to concurrently function. You should use this function if the f is a blocking function.

Create a concurrent process backed by core.async/pipeline-blocking.
`f` must be a function of two arguments. the first is a value retrieved a pipeline.
the second is a options-map supplied to `concurrently` function.
You should use this function if the `f` is a blocking function.
sourceraw docstring

concurrentlyclj

(concurrently {:keys [input-ch ordered?] :as context} items-ch options)
source

current-concurrent-countclj

source

data-end?clj

(data-end? boxed)
source

get-resultsclj

(get-results ch
             &
             [{catch-fn :catch
               finally-fn :finally
               context-name :context-name
               timeout-ms :timeout-ms
               :or {context-name "none" timeout-ms 120000}}])

Safely read all data from a channel and return a vector containing all read data. the items read from a channel must be databoxes. The result vector contains unboxed data of the read items. If an exception occurred while resolving read items, an exception will be thrown.

This function will throw an exception if :timeout-ms option value isn't :no-timeout and no data available from the 'ch' channel after the :timeout-ms.

The :catch is a funciton called when an exception occurs. This fn is for closing related channels certainly. In many cases, if an exception occurred, no following channel-processsings are not acceptable, So all read channel must be closed at this time. It is recommended to supply this function always, but should not be used for handling application exceptions. Only for channel handling. Application exceptions should be handled by try-catch in application code which wraps this 'get-result' call.

The :finally function will be called always, but called after the ch is CLOSED. If the ch is not read fully, it will be read fully by 'cleanup-in-background' fn automatically, When the ch is read fully or be closed manually, this :finally fn will be called. So SHOULD NOT DO APPLICATION's FINALLY-PROCESS here. This function is for actions which must be occurred after the ch is closed. Application's finally-process must be handled by try-catch in application code which wraps this 'get-result' call.

'ch' will be read fully even if this function returns early before reading all data from 'ch',
because a go-block is launched automatically for reading 'ch' fully. So a pipeline backing the 'ch' never be stacked by never-read-data remained in a pipeline.

Safely read all data from a channel and return a vector containing all read data.
the items read from a channel must be databoxes. The result vector contains 
unboxed data of the read items. If an exception occurred while resolving read items, 
an exception will be thrown.

This function will throw an exception if :timeout-ms option value isn't :no-timeout and no data available
from the 'ch' channel after the :timeout-ms.

The :catch is a funciton called when an exception occurs. This fn is for closing related channels certainly. 
In many cases, if an exception occurred, no following channel-processsings are not acceptable,
So all read channel must be closed at this time. It is recommended to supply this function always, 
but should not be used for handling application exceptions. Only for channel handling.
Application exceptions should be handled by try-catch in application code which wraps this 'get-result' call.

The :finally function will be called always, but called after the ch is CLOSED. 
If the ch is not read fully, it will be read fully by 'cleanup-in-background' fn automatically,
When the ch is read fully or be closed manually, this :finally fn will be called. 
So SHOULD NOT DO APPLICATION's FINALLY-PROCESS here. This function is for actions which must be occurred after
the ch is closed. Application's finally-process must be handled by try-catch in application code which
wraps this 'get-result' call.

'ch' will be read fully even if this function returns early before reading all data from 'ch',  
because a go-block is launched automatically for reading 'ch' fully.
So a pipeline backing the 'ch' never be stacked by never-read-data remained in a pipeline.
sourceraw docstring

job-cancelled?clj

(job-cancelled? transaction-id)
source

jobsclj

source

take-or-throw!cljmacro

(take-or-throw! result-ch timeout-ms & [context-name])
source

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

× close