LGTM

On Tue, Apr 8, 2014 at 2:02 PM, Klaus Aehlig <[email protected]> wrote:

> ...as the question of who has pending requests is an import
> part of the data structure.
>
> 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 2b53688..bfc3464 100644
> --- a/src/Ganeti/Locking/Waiting.hs
> +++ b/src/Ganeti/Locking/Waiting.hs
> @@ -29,6 +29,7 @@ module Ganeti.Locking.Waiting
>   , updateLocks
>   , updateLocksWaiting
>   , getAllocation
> + , getPendingOwners
>   ) where
>
>  import qualified Data.Map as M
> @@ -82,6 +83,10 @@ emptyWaiting =
>                , lwPendingOwners = M.empty
>                }
>
> +-- | Get the set of owners with pending lock requests.
> +getPendingOwners :: LockWaiting a b c -> S.Set b
> +getPendingOwners = M.keysSet . lwPendingOwners
> +
>  -- | Get the allocation state from the waiting state
>  getAllocation :: LockWaiting a b c -> L.LockAllocation a b
>  getAllocation = lwAllocation
> --
> 1.9.1.423.g4596e3a
>
>

Reply via email to