Liking cljdoc? Tell your friends :D

tech.resource


*resource-context*clj

source

*resource-debug-double-free*clj

source

ignoreclj

(ignore item)

Ignore specifically this resource.

Ignore specifically this resource.
sourceraw docstring

ignore-resourcesclj

(ignore-resources pred)

Ignore these resources for which pred returns true and do not track them. They will not be released unless added again with track

Ignore these resources for which pred returns true and do not track them.
They will not be released unless added again with track
sourceraw docstring

make-resourceclj

(make-resource release-fn!)

Make a releaser out of an arbitrary closure

Make a releaser out of an arbitrary closure
sourceraw docstring

PResourcecljprotocol

release-resourceclj

(release-resource item)
source

releaseclj

(release item)

Release this resource and remove it from tracking. Exceptions propagate to callers.

Release this resource and remove it from tracking.  Exceptions propagate to callers.
sourceraw docstring

release-current-resourcesclj

(release-current-resources)
(release-current-resources pred)

Release all resources matching either a predicate or all resources currently tracked. Returns any exceptions that happened during release but continues to attempt to release anything else in the resource list.

Release all resources matching either a predicate or all resources currently tracked.
Returns any exceptions that happened during release but continues to attempt to release
anything else in the resource list.
sourceraw docstring

release-resource-seqclj

(release-resource-seq res-ctx & {:keys [pred] :or {pred identity}})

Release a resource context returned from return-resource-context.

Release a resource context returned from return-resource-context.
sourceraw docstring

return-resource-seqcljmacro

(return-resource-seq & body)

Run code and return both the return value and the resources the code created. Returns: {:return-value retval :resource-seq resources}

Run code and return both the return value and the resources the code created.
Returns:
{:return-value retval
:resource-seq resources}
sourceraw docstring

safe-createclj

(safe-create resource-atom create-fn)

Create a resource and assign it to an atom. Allows threadsafe implementation of singelton type resources. Implementations need to take care that in the case of conflict their resource may be destroyed when the atom has not been set yet so their release-resource implementation needs to use compare-and-set! instead of reset! in order to clear the atom

Create a resource and assign it to an atom.  Allows threadsafe implementation of
singelton type resources.  Implementations need to take care that in the case of
conflict their resource may be destroyed when the atom has not been set yet so their
release-resource implementation needs to use compare-and-set! instead of reset! in
order to clear the atom
sourceraw docstring

trackclj

(track item)

Begin tracking this resource. Resource be released when current resource context ends

Begin tracking this resource. Resource be released when current resource context ends
sourceraw docstring

with-bound-resource-seqcljmacro

(with-bound-resource-seq resource-seq & body)

Run code and return both the return value and the (updated,appended) resources created. Returns: {:return-value retval :resource-seq resources}

Run code and return both the return value and the (updated,appended) resources created.
Returns:
{:return-value retval
:resource-seq resources}
sourceraw docstring

with-resource-contextcljmacro

(with-resource-context & body)

Begin a new resource context. Any resources added while this context is open will be released when the context ends.

Begin a new resource context.  Any resources added while this context is open will be
released when the context ends.
sourceraw docstring

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

× close