aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/remoteCounter.mli
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2014-02-24 11:40:32 +0100
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2014-02-26 14:53:08 +0100
commitd002d775f76ddab45983354022a0f8c59b1af313 (patch)
treec60111f1a613cd9e86bd666ac501fb0986a9a3d5 /lib/remoteCounter.mli
parent2145e0274482017dc8e16c8ee774bc422be930e1 (diff)
remoteCounter: backup/restore
When you resume the compilation of a .vi file, you want to avoid collisions on fresh names.
Diffstat (limited to 'lib/remoteCounter.mli')
-rw-r--r--lib/remoteCounter.mli11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/remoteCounter.mli b/lib/remoteCounter.mli
index f17f1be3c..5a47ba663 100644
--- a/lib/remoteCounter.mli
+++ b/lib/remoteCounter.mli
@@ -6,9 +6,18 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
+(* Remote counters are *global* counters for fresh ids. In the master/slave
+ * scenario, the slave installs a getter that asks the master for a fresh
+ * value. In the scenario of a slave that runs after the death of the master
+ * on some marshalled data, a backup of all counters status should be taken and
+ * restored to avoid reusing ids. *)
+
type 'a getter = unit -> 'a
type 'a installer = ('a getter) -> unit
-val new_counter :
+val new_counter : name:string ->
'a -> incr:('a -> 'a) -> build:('a -> 'b) -> 'b getter * 'b installer
+type remote_counters_status
+val backup : unit -> remote_counters_status
+val restore : remote_counters_status -> unit