(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close