Skip to content

Commit

Permalink
Use RMutex for locks (references #46).
Browse files Browse the repository at this point in the history
There seem to be some lock re-entrancy bugs in `BatIO` that cause
hangs when we use a plain mutex for synchronization.  Using RMutex
until those problems are fixed or we determine that they are inherent.
  • Loading branch information
mdekstrand committed Feb 23, 2010
1 parent f6ba4b9 commit a7174ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/batteries.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 := Mutex.Mutex.make ();;
IO.lock := Mutex.Mutex.make ();;
IO.lock_factory := Mutex.Mutex.make;;
lock := Mutex.Mutex.make ();;
Unix.lock := RMutex.make ();;
IO.lock := RMutex.make ();;
IO.lock_factory := RMutex.make;;
lock := RMutex.make ();;

0 comments on commit a7174ad

Please sign in to comment.