diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/future.ml | 2 | ||||
| -rw-r--r-- | lib/future.mli | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/future.ml b/lib/future.ml index 690255edda..77386a1a9f 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 09d18ff269..b4eced06a9 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. *) |
