goaljobs 0.3
[goaljobs.git] / goaljobs.ml
index 4024b6d..208882c 100644 (file)
@@ -420,6 +420,14 @@ let memory_delete key =
       Pervasives.flush chan;
   )
 
+let memory_list () =
+  with_memory_locked (
+    fun fd ->
+      let chan = in_channel_of_descr fd in
+      let memory : (string, string) Hashtbl.t = input_value chan in
+      Hashtbl.fold (fun key value xs -> (key, value) :: xs) memory []
+  )
+
 let published_goals = ref []
 let publish name fn = published_goals := (name, fn) :: !published_goals
 let get_goal name =