Liking cljdoc? Tell your friends :D

eva.concurrent.background-resource-map

This is a possibly temporary solution to the background realization of delayed resources. Each background-resource-map uses the same global (currently unbounded) thread pool, but aims for utilizing only two threads at a time to realize resources in order of priority as determined by an arbitrary selector function passed in.

This is a possibly temporary solution to the background realization of delayed
resources. Each background-resource-map uses the same global (currently unbounded)
thread pool, but aims for utilizing only two threads at a time to realize resources
in order of priority as determined by an arbitrary selector function passed in.
raw docstring

background-resource-mapclj

(background-resource-map select-fn)

select-fn is expected to take a map of tag->delay and return the MapEntry chosen to be realized next.

select-fn is expected to take a map of tag->delay and return the MapEntry chosen
to be realized next.
sourceraw docstring

enqueue-background-updateclj

(enqueue-background-update resource-map dq tag f & args)

Essentially a wrapper over delay-queue/enqueue-update to enable the magic.

Essentially a wrapper over delay-queue/enqueue-update to enable the magic.
sourceraw docstring

get-next!clj

(get-next! select-fn tag->delay)

Like a swap!, but doesn't return the new value of the atom. Instead returns the thing selected and dissoced from the map.

Like a swap!, but doesn't return the new value of the atom.
Instead returns the thing selected and dissoced from the map.
sourceraw docstring

global-background-resource-poolclj

source

realize-next-resourceclj

(realize-next-resource resource-map)

Tries to select a new delay to realize. If it realizes one, it returns true; otherwise nil.

Tries to select a new delay to realize. If it realizes one, it returns true; otherwise nil.
sourceraw docstring

thread-counterclj

source

thread-flowclj

(thread-flow resource-map)

Try to realize-next-resource; if that returns true, repeat; otherwise, exit. In the event that an exception is caught, it logs it at warn-level and exits.

Try to realize-next-resource; if that returns true, repeat; otherwise, exit.
In the event that an exception is caught, it logs it at warn-level and exits.
sourceraw docstring

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

× close