LGTM
On Tue, Apr 8, 2014 at 2:02 PM, Klaus Aehlig <[email protected]> wrote: > ...so that all kind of diagnostic tasks can be carried out without > duplicating the functionality on the waiting structure. Note that > we still do not export the constructor so that we can change the > implementation without breaking the interface. > > Signed-off-by: Klaus Aehlig <[email protected]> > --- > src/Ganeti/Locking/Waiting.hs | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/src/Ganeti/Locking/Waiting.hs b/src/Ganeti/Locking/Waiting.hs > index a139065..2b53688 100644 > --- a/src/Ganeti/Locking/Waiting.hs > +++ b/src/Ganeti/Locking/Waiting.hs > @@ -28,6 +28,7 @@ module Ganeti.Locking.Waiting > , emptyWaiting > , updateLocks > , updateLocksWaiting > + , getAllocation > ) where > > import qualified Data.Map as M > @@ -81,6 +82,10 @@ emptyWaiting = > , lwPendingOwners = M.empty > } > > +-- | Get the allocation state from the waiting state > +getAllocation :: LockWaiting a b c -> L.LockAllocation a b > +getAllocation = lwAllocation > + > -- | Internal function to fulfill one request if possible, and keep track > of > -- the owners to be notified. The type is chosen to be suitable as fold > -- operation. > -- > 1.9.1.423.g4596e3a > >
