diff options
author | Enrico Tassi <Enrico.Tassi@inria.fr> | 2014-02-24 11:40:32 +0100 |
---|---|---|
committer | Enrico Tassi <Enrico.Tassi@inria.fr> | 2014-02-26 14:53:08 +0100 |
commit | d002d775f76ddab45983354022a0f8c59b1af313 (patch) | |
tree | c60111f1a613cd9e86bd666ac501fb0986a9a3d5 /lib/remoteCounter.mli | |
parent | 2145e0274482017dc8e16c8ee774bc422be930e1 (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.mli | 11 |
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 |