Skip to content
Browse files

Merge remote branch 'github/master'

  • Loading branch information...
2 parents e8c1e36 + a194108 commit 7b403aecec67c3ef6f0a4f85996e8b0418f2003d @thelema thelema committed Apr 26, 2010
Showing with 10 additions and 7 deletions.
  1. +4 −1 src/batInnerIO.ml
  2. +2 −2 src/batMap.mli
  3. +4 −4 src/batteries.ml
View
5 src/batInnerIO.ml
@@ -292,7 +292,10 @@ let flush_all () =
BatConcurrent.sync !lock ( Outputs.iter (fun o -> try flush o with _ -> ())) outputs
let close_all () =
- BatConcurrent.sync !lock (Outputs.iter (fun o -> try close_out o with _ -> ())) outputs
+ let outs =
+ BatConcurrent.sync !lock (Outputs.fold (fun o os -> o :: os) outputs) []
+ in
+ List.iter (fun o -> try close_out o with _ -> ()) outs
let read_all i =
let maxlen = 1024 in
View
4 src/batMap.mli
@@ -68,7 +68,7 @@ module type S =
search, [Not_found] is raised.
@since 1.2.0
- @raise Not_found
+ @raise Not_found if [k] is unbound in [m] (or [f] raises [Not_found])
*)
val mem: key -> 'a t -> bool
@@ -386,7 +386,7 @@ val modify : 'a -> ('b -> 'b) -> ('a, 'b) t -> ('a, 'b) t
raised during the search, [Not_found] is raised.
@since 1.2.0
- @raise Not_found *)
+ @raise Not_found if [k] is unbound in [m] (or [f] raises [Not_found]) *)
val extract : 'a -> ('a, 'b) t -> 'b * ('a, 'b) t
(** [extract k m] removes the current binding of [k] from [m],
View
8 src/batteries.ml
@@ -2,7 +2,7 @@ include Batteries_uni (* the meat of this module is in batteries_uni.mli *)
module Mutex = BatMutex;;
module RMutex = BatRMutex;;
-Unix.lock := RMutex.make ();;
-IO.lock := RMutex.make ();;
-IO.lock_factory := RMutex.make;;
-lock := RMutex.make ();;
+Unix.lock := Mutex.Mutex.make ();;
+IO.lock := Mutex.Mutex.make ();;
+IO.lock_factory := Mutex.Mutex.make;;
+lock := Mutex.Mutex.make ();;

0 comments on commit 7b403ae

Please sign in to comment.
Something went wrong with that request. Please try again.