diff options
| author | Enrico Tassi | 2014-02-10 17:41:01 +0100 |
|---|---|---|
| committer | Enrico Tassi | 2014-02-10 18:04:10 +0100 |
| commit | 98041625b841bad9bdc37329279cf84c2e9701b3 (patch) | |
| tree | 5c07b1919ad82fbc0f417cb7d544aa36459c53ac /lib | |
| parent | c50d3830ae92735383e201e72b499b8bff0918c7 (diff) | |
STM: fix valid_id coming from Qed errors
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/future.ml | 2 | ||||
| -rw-r--r-- | lib/future.mli | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/future.ml b/lib/future.ml index b6cb498c61..c54b4e8dbe 100644 --- a/lib/future.ml +++ b/lib/future.ml @@ -50,7 +50,7 @@ and 'a computation = 'a comput ref let create f x = ref (Ongoing (Ephemeron.create (f, Pervasives.ref x))) let get x = match !x with - | Finished v -> (fun x -> x), ref( Val (v,None)) + | Finished v -> id, ref( Val (v,None)) | Ongoing x -> try Ephemeron.get x with Ephemeron.InvalidKey -> (fun x -> x), ref (Exn NotHere) diff --git a/lib/future.mli b/lib/future.mli index 4f27767ba4..4dca2f1449 100644 --- a/lib/future.mli +++ b/lib/future.mli @@ -111,7 +111,9 @@ val chain : ?greedy:bool -> pure:bool -> val force : 'a computation -> 'a val compute : 'a computation -> 'a value -(* Final call, no more *inpure* chain allowed since the state is lost *) +(* Final call, no more *inpure* chain allowed since the state is lost. + * Also the fix_exn function is lost, hence error reporting can be incomplete + * in a computation obtained by chaining on a joined future. *) val join : 'a computation -> 'a (*** Utility functions ************************************************* ***) |
