You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based partially on datacrypt-project#24
Rewritten to primarily use core.async.
* src/hitchhiker/tree/konserve.cljc (create-id): new function; prepends
the current timestamp as hex to the UUID key.
(KonserveBackend.-write-node): use create-id to generate the storage ID.
* src/hitchhiker/tree/tracing-gc/konserve.cljc: new namespace.
* src/hitchhiker/tree/tracing-gc.cljc: new namespace.
* .gitignore: ignore IntelliJ files.
* project.clj: update konserve to 0.6.0-SNAPSHOT.
(observe-addr! [this addr] "Marks the given addr as being currently active")
10
+
(observed? [this addr] "Returns true if the given addr was observed"))
11
+
12
+
(defmacrodo-<!
13
+
"Force into an async taking call.
14
+
15
+
Evaluates to <! when in an async backend.
16
+
Wraps form in a thread when non-async."
17
+
[& form]
18
+
(ha/if-async?
19
+
`(async/<! ~@form)
20
+
`(async/<! (async/thread ~@form))))
21
+
22
+
(defntrace-gc!
23
+
"Does a tracing GC and frees up all unused keys.
24
+
This is a simple mark-sweep algorithm.
25
+
26
+
gc-scratch should be an instance of IGCScratch
27
+
gc-roots should be a list of the roots of currently active trees.
28
+
all-keys should be a core.async channel that will contain every key in storage.
29
+
delete-fn will be called on every key that should be deleted during the sweep phase. It is expected to return a channel that yields when the item is deleted."
0 commit comments