aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/future.mli
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2014-11-28 15:59:51 +0100
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2014-11-28 15:59:51 +0100
commit9f4546a103607e0f2283897c094ce05ffa2d5c21 (patch)
treee3d97e8220114837302f902d79ce66dddb810127 /lib/future.mli
parenta9fd21ac2b2e3908d8eb8d5a549c43949cddc69a (diff)
Future: API for blocking futures
Diffstat (limited to 'lib/future.mli')
-rw-r--r--lib/future.mli9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/future.mli b/lib/future.mli
index a03823af8..bae4fa751 100644
--- a/lib/future.mli
+++ b/lib/future.mli
@@ -95,13 +95,12 @@ val from_here : ?fix_exn:fix_exn -> 'a -> 'a computation
* (the hook), both performing some computations for the same state id. *)
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. *)
+(* Run remotely, returns the function to assign.
+ If not blocking (the default) it raises NotReady if forced before the
+ delage assigns it. *)
type 'a assignement = [ `Val of 'a | `Exn of exn | `Comp of 'a computation]
val create_delegate :
- ?force:(unit -> 'a assignement) ->
- fix_exn -> 'a computation * ('a assignement -> unit)
+ ?blocking:bool -> fix_exn -> 'a computation * ('a assignement -> unit)
(* Given a computation that is_exn, replace it by another one *)
val replace : 'a computation -> 'a computation -> unit