aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2014-05-16 20:18:02 +0200
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2014-05-16 20:20:25 +0200
commit0f6a9c150b1a93358f6e9f8de5072fff52625ab9 (patch)
treeabf3c9593a4af215a1a334bacfbc78b01543cdba /lib
parentc4bdf93e358b97b32e0d80d6c7d1b79a2ece1dc2 (diff)
Declare: fix Future management
Diffstat (limited to 'lib')
-rw-r--r--lib/future.ml2
-rw-r--r--lib/future.mli3
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/future.ml b/lib/future.ml
index 690255edd..77386a1a9 100644
--- a/lib/future.ml
+++ b/lib/future.ml
@@ -90,6 +90,8 @@ let uuid kx = let id, _, _ = get kx in id
let from_val ?(fix_exn=id) v = create fix_exn (Val (v, None))
let from_here ?(fix_exn=id) v = create fix_exn (Val (v, Some (!freeze ())))
+let fix_exn_of ck = let _, fix_exn, _ = get ck in fix_exn
+
let default_force () = raise NotReady
let assignement ck = fun v ->
let _, fix_exn, c = get ck in
diff --git a/lib/future.mli b/lib/future.mli
index 09d18ff26..b4eced06a 100644
--- a/lib/future.mli
+++ b/lib/future.mli
@@ -84,6 +84,9 @@ val from_val : ?fix_exn:fix_exn -> 'a -> 'a computation
the value is not just the 'a but also the global system state *)
val from_here : ?fix_exn:fix_exn -> 'a -> 'a computation
+(* To get the fix_exn of a computation *)
+val fix_exn_of : 'a computation -> fix_exn
+
(* Run remotely, returns the function to assign. Optionally tekes a function
that is called when forced. The default one is to raise NotReady.
The assignement function does not change the uuid. *)