Liking cljdoc? Tell your friends :D

flowgraph.thread-control


hard-fail-error-fnclj

(hard-fail-error-fn)
source

job-cancellerclj

(job-canceller graph)

Produces a watch-fn that puts the graph into a cancelled state IFF the tessera is ever revoked.

Produces a watch-fn that puts the graph into a cancelled state IFF the
tessera is ever revoked.
sourceraw docstring

launch-threadsclj

(launch-threads graph guard)

Contracted to kick off threads up to the graph's thread-count to work on the current job. In the current implementation, this works by sending signals using signal.

Contracted to kick off threads up to the graph's thread-count to work on the current
job. In the current implementation, this works by sending signals using signal.
sourceraw docstring

possibly-start-jobclj

(possibly-start-job graph)

If the graph is in an idle state, and if there is some job queued, this kicks off the next job. Sets the graph state to :working.

If the graph is in an idle state, and if there is some job queued, this kicks off the next job.
Sets the graph state to :working. 
sourceraw docstring

recoverable-error-fnclj

(recoverable-error-fn graph)

This is designed to be the default error handler for edges. Depending on whether the error is a timeout or something else, this delivers an IExceptionInfo with the detailed messages to the current promise (if there is one), then sets the graph status to :error.

This is designed to be the default error handler for edges. Depending on whether
the error is a timeout or something else, this delivers an IExceptionInfo with the detailed messages
to the current promise (if there is one), then sets the graph status to :error.
sourceraw docstring

stop-flowclj

(stop-flow graph)

Designed to be called when tearing down a flow graph. This sets the graph status to :shutdown, delivers IllegalStateExceptions to current and all queued promises, instructs the executor to shutdownNow(), and signals any currently running threads to :die.

Designed to be called when tearing down a flow graph. This sets the graph status
to :shutdown, delivers IllegalStateExceptions to current and all queued promises,
instructs the executor to shutdownNow(), and signals any currently running threads
to :die.
sourceraw docstring

thread-flowclj

(thread-flow graph)

Over-arching thread flow. As long as the current thread is not interrupted, the graph state is not set to :shutdown, and the thread hasn't been signalled to :die, this does a work-loop until exiting, decrements the graph's active thread count, and waits for another signal. In the event that this is the last thread to go into waiting status, it is responsible for delivering a completed job and for handling :error and :broken states.

Over-arching thread flow. As long as the current thread is not interrupted, the
graph state is not set to :shutdown, and the thread hasn't been signalled to :die,
this does a work-loop until exiting, decrements the graph's active thread count,
and waits for another signal. In the event that this is the last thread to go into
waiting status, it is responsible for delivering a completed job and for handling
:error and :broken states.
sourceraw docstring

unless-shutdownclj

(unless-shutdown old new)

Use this with swap! instead of reset! on the graph's status, unless you're explicitly starting it back up after it's been shut down.

Use this with swap! instead of reset! on the graph's status, unless
you're explicitly starting it back up after it's been shut down.
sourceraw docstring

when-viableclj

(when-viable old new)

Use this with swap! instead of reset! on the graph's status for 'normal' operations. It won't overwrite :shutdown, :error, :cancelled, or :broken states.

Use this with swap! instead of reset! on the graph's status for 'normal' operations.
It won't overwrite :shutdown, :error, :cancelled, or :broken states.
sourceraw docstring

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

× close