(clean-stack-trace ee)
Return executionexception stacktrace with stack cleaned at the top
Return executionexception stacktrace with stack cleaned at the top
(finalize-result result
{:org.clojars.roklenarcic.paginator.impl/keys
[batcher futs counters results pages?]})
Act on operation result, sending items to their respective queues.
Act on operation result, sending items to their respective queues.
(instr-batch items emit-pages?)
Add :add-page function to all items.
Add :add-page function to all items.
(page-loop {:org.clojars.roklenarcic.paginator.impl/keys [run-fn batcher futs
input results pages?]
:as options}
out-cnt)
Dual queue synchronous page-loop. Input is a volatile containing items and is lazily read when queue is empty.
Tries to finish one of the tasks that moves the engine along. If task returns a map, even an empty one, it is considered to have done something and the next tasks are not tried. The list of finished items is pushed into a priority queue based on :idx of PagingState. This enables that we can emit results in order of inputs if desired.
PagingStates are tagged with increasing idx.
Dual queue synchronous page-loop. Input is a volatile containing items and is lazily read when queue is empty. Tries to finish one of the tasks that moves the engine along. If task returns a map, even an empty one, it is considered to have done something and the next tasks are not tried. The list of finished items is pushed into a priority queue based on :idx of PagingState. This enables that we can emit results in order of inputs if desired. PagingStates are tagged with increasing idx.
(poll-futures futs)
Iterates the futures Queue, finds any finished futures, processes the return, returning processed items map or nil if no future has been resolved.
Iterates the futures Queue, finds any finished futures, processes the return, returning processed items map or nil if no future has been resolved.
(process-ret ret)
Process a return, returning a processed items map.
Process a return, returning a processed items map.
(read-input input)
Tries to gather an item from input returns processed items map, if able.
Tries to gather an item from input returns processed items map, if able.
(realized res)
Returns realized result or nil
Returns realized result or nil
(spare-concurrency? run-fn options)
Returns true if there seems to be concurrency to spare. Always true if user didn't specify concurrency limit and it wasn't measured.
Returns true if there seems to be concurrency to spare. Always true if user didn't specify concurrency limit and it wasn't measured.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close